-
Notifications
You must be signed in to change notification settings - Fork 204
Closed
Description
The L1Loss should create a criterion that measures the MAE error, but in TorchSharp it measures the MSE.
I believe that this is incorrect. See the following screenshot comparing TorchSharp and pytorch, which I believe should get identical results, but don't:
See the call to functional::mse_loss
:
TorchSharp/src/Native/LibTorchSharp/THSLoss.cpp
Lines 94 to 102 in 26240d5
Tensor THSNN_l1_loss(const Tensor input, const Tensor target, const int64_t reduction) | |
{ | |
CATCH_RETURN_Tensor( | |
auto opts = torch::nn::functional::MSELossFuncOptions(); | |
ApplyReduction(opts, reduction); | |
res = ResultTensor(torch::nn::functional::mse_loss(*input, *target, opts)); | |
) | |
} |
If this is indeed incorrect, I would be happy to submit a fix in a PR, but am still figuring out how to make my projects use the locally built version of TorchSharp—I'm not the biggest C# / dotnet / nuget expert.
Metadata
Metadata
Assignees
Labels
No labels