Fix AMD by changing from GetTensorData<T>() to GetTensorMutableData<T>()
This commit is contained in:
@@ -28,7 +28,11 @@ namespace ANSCENTER {
|
||||
void warmupModel();
|
||||
bool Init(const std::string& modelPath, const cv::Size& targetInputShape, bool useGPU = true);
|
||||
bool preprocess(const cv::Mat& image, float*& blob, std::vector<int64_t>& inputTensorShape);
|
||||
std::vector<Object> postprocess(const std::vector<Ort::Value>& outputTensors, const std::string& camera_id);
|
||||
// outputTensors is non-const because GetTensorMutableData() (the
|
||||
// ORT API that doesn't hang on AMD DirectML) requires a non-const
|
||||
// Ort::Value receiver. See comment at the GetTensorMutableData
|
||||
// call site in postprocess() for the full rationale.
|
||||
std::vector<Object> postprocess(std::vector<Ort::Value>& outputTensors, const std::string& camera_id);
|
||||
std::vector<Object> classify(const cv::Mat& image, const std::string& camera_id);
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user