Building errors from running libtorch

HI, All

I get a building error on libtorch

torch::Tensor x = x1.view({-1, input_dim});

error: no matching function for call to ‘at::Tensor::view()’
torch::Tensor x = x1.view({-1, input_dim});

Any suggestions of how to modify it please ?

The python code is:
x = x.view(-1, self.input_dim)

Much appreciated.
^

Are you trying to reshape the tensor? If yes, there is a reshape API call on Tensor, could you try:
x = x1.reshape({-1, input_dim}) ?

Thanks for suggestions