Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
yq committed Nov 29, 2018
1 parent 36f195b commit 54c5972
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/evaluator/train_evaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ void test( CompatibilityNet & comp_net,
target = squeeze(target, /*dim*/1);

Tensor output = comp_net.forward(data);

cout << target[0] << endl;
cout << output[0] << endl;
test_loss += nll_loss(output, target, symbols_w, Reduction::Sum).template item<float>();
auto pred = output.argmax(1);
correct_n += pred.eq(target).sum().template item<int64_t>();
Expand Down

0 comments on commit 54c5972

Please sign in to comment.