Thank you. I am asking because my build system / linker fails (below). Not sure what the proper way is.

  
    
    
    C10 error when converting cv::Mat to tensor with from_blob C++
  
  
    When I add from_blob to my code the project fails to compile. I want to create a tensor out of a cv::Mat but it keeps failing with the error below. Again, without from_blob my project compiles fine. 
cv::Mat amplitudePatch = amplitude(roi);
torch::from_blob(amplitudePatch.data, 
{1, amplitudePatch.size().height, amplitudePatch.size().width, amplitudePatch.channels()},
at::TensorOptions(at::kFloat));

SunlightNoiseClassifier/libSunlightNoiseClassifier.a(SunlightNoiseClassifier.cpp.o): In function…