Solved by ptrblck in post #3 
              
              
                I guess the error might be thrown because you are using at::Tensor for your input  as well as in forward instead of torch::Tensor. 
PS: Tagging certain people might discourage others to answer in your thread and I’m pretty sure there are more experienced C++ frontend users here.