This looks like it should be right to me:
torch::Tensor loss = torch::mse_loss(prediction, desired_prediction.detach(), torch::nn::functional::MSELossFuncOptions(torch::kNone));
loss.backward();
But I’m getting
error: cannot convert ‘torch::nn::functional::MSELossFuncOptions {aka torch::nn::MSELossOptions}’ to ‘int64_t {aka long int}’ for argument ‘3’ to ‘at::Tensor at::mse_loss(const at::Tensor&, const at::Tensor&, int64_t)
I’m sure it’s a simple thing - any idea what’s wrong?