You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But I found a probable mistake in demo.py at line 112: error = 1 - torch.eq(predictions_var, target_var).float().mean()
it might have to be corrected to: error = 1 - torch.eq(predictions_var.view(-1), target_var).float().mean()
Because the size of predictions_var and target_var are (train_size, 1) and (train_size, ), torch.eq(...) will return a train_size * train_size matrix, and its entries are almost 0 (only 1 at diagonal). Then the error rate will not able to decrease.
The text was updated successfully, but these errors were encountered:
The code currently is based on PyTorch v0.1.12. We will release the code for the latest PyTorch version soon. Please kindly use v0.1.12 for now. Thanks!
Hi, thanks for this efficient densenet code.
But I found a probable mistake in demo.py at line 112:
error = 1 - torch.eq(predictions_var, target_var).float().mean()
it might have to be corrected to:
error = 1 - torch.eq(predictions_var.view(-1), target_var).float().mean()
Because the size of predictions_var and target_var are (train_size, 1) and (train_size, ),
torch.eq(...)
will return a train_size * train_size matrix, and its entries are almost 0 (only 1 at diagonal). Then the error rate will not able to decrease.The text was updated successfully, but these errors were encountered: