I’m trying to write a simple function in c++ and then call in python but when I do that I’m getting the error that incompatible function arguments. The following argument types are supported: 1. (ag:0 at::Tensor) -> at::Tensor. What I am doing wrong?
I would use torch::Tensor even if they’re an alias these days.
All arguments should either be const torch::Tensor& (if not modified) or torch::Tensor (no reference).
(I think there is a brief mention of this in Chapter 15 of our book.)