Using Libtorch 1.6.0 in C++, I get the following error:
error: no matching member function for call to 'size'
My line is the following:
image = F::interpolate(image, F::InterpolateFuncOptions().size({target_height, target_width}).mode(torch::kNearest));
But in the documentation it seems correct... Any idea?
Thanks in advance
You should wrap it with
std::vector
like this:Reason for this is
size
has no overloaded call for std::initializer_list that you were trying to use (seesize
docs here).