Libtorch C++ - no matching member function for call to 'size' for InterpolateFuncOptions
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:
image = F::interpolate(image, 
        F::InterpolateFuncOptions()
        .size(std::vector&lt;&gt;{target_height, target_width})
        .mode(torch::kNearest));

Reason for this is size has no overloaded call for std::initializer_list that you were trying to use (see size docs here).
