Skip to content

Commit

Permalink
add weight to_device
Browse files Browse the repository at this point in the history
  • Loading branch information
yq committed Nov 29, 2018
1 parent c5b75ec commit 35bcb05
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/evaluator/train_evaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ int main(int argc, char ** argv) {
symbols_w[i] = 1;
}
symbols_w[symbols_n] = 1.0 / symbols_n / (symbols_n - 1);
symbols_w.to(device);

for (int epoch = 1; epoch <= epochs; epoch++) {
train(epoch, comp_net, *train_loader, optimizer, device);
Expand Down

0 comments on commit 35bcb05

Please sign in to comment.