Skip to content
Snippets Groups Projects
Commit cf56fefc authored by Franck Dary's avatar Franck Dary
Browse files

Corrected bug on CustomHingeLoss where it would not run on gpu

parent 817bb319
No related branches found
No related tags found
No related merge requests found
#include "CustomHingeLoss.hpp"
#include "NeuralNetwork.hpp"
torch::Tensor CustomHingeLoss::operator()(torch::Tensor prediction, torch::Tensor gold)
{
torch::Tensor loss = torch::zeros(1);
torch::Tensor loss = torch::zeros(1).to(NeuralNetworkImpl::device);
for (unsigned int i = 0; i < prediction.size(0); i++)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment