프로그램 사용/google coral
coral tpu delegate example
구차니
2022. 1. 25. 09:02
cpp
[링크 : https://github.com/google-coral/tflite]
[링크 : https://coral.ai/docs/edgetpu/tflite-cpp/]
python
[링크 : https://coding-yoon.tistory.com/91]
+
auto* delegate = edgetpu_create_delegate(device.type, device.path, nullptr, 0); interpreter->ModifyGraphWithDelegate({delegate, edgetpu_free_delegate}); |
[링크 : https://github.com/google-coral/tflite/blob/master/cpp/examples/classification/classify.cc]
auto delegates = delegate_providers.CreateAllDelegates(); for (auto& delegate : delegates) { const auto delegate_name = delegate.provider->GetName(); if (interpreter->ModifyGraphWithDelegate(std::move(delegate.delegate)) != kTfLiteOk) { LOG(ERROR) << "Failed to apply " << delegate_name << " delegate."; exit(-1); } else { LOG(INFO) << "Applied " << delegate_name << " delegate."; } } |