rahafaljundi / MAS-Memory-Aware-Synapses

Memory Aware Synapses method implementation code
94 stars 20 forks source link

using mnist_net.pth.tar get acc 0 #1

Closed mingzhang96 closed 6 years ago

mingzhang96 commented 6 years ago

I get acc=0 using the given model when running demo. Here is the output log:

=> no checkpoint found at 'exp_dir/SGD_MNIST_NET12/epoch.pth.tar'
0
Epoch 0/9
----------
lr is 0.01
LR is set to 0.01
train Loss: 0.0008 Acc: 0.0000
val Loss: 0.0002 Acc: 0.0000

Epoch 1/9
----------
lr is 0.01
train Loss: 0.0002 Acc: 0.0000
val Loss: 0.0001 Acc: 0.0000

Epoch 2/9
----------
lr is 0.01
train Loss: 0.0001 Acc: 0.0000
val Loss: 0.0001 Acc: 0.0000

Epoch 3/9
----------
lr is 0.01
train Loss: 0.0001 Acc: 0.0000
val Loss: 0.0001 Acc: 0.0000

Epoch 4/9
----------
lr is 0.01
train Loss: 0.0001 Acc: 0.0000
val Loss: 0.0001 Acc: 0.0000

Epoch 5/9
----------
lr is 0.01
train Loss: 0.0001 Acc: 0.0000
val Loss: 0.0001 Acc: 0.0000

Epoch 6/9
----------
lr is 0.01
train Loss: 0.0001 Acc: 0.0000
val Loss: 0.0001 Acc: 0.0000

Epoch 7/9
----------
lr is 0.01
train Loss: 0.0001 Acc: 0.0000
val Loss: 0.0001 Acc: 0.0000

Epoch 8/9
----------
lr is 0.01
train Loss: 0.0001 Acc: 0.0000
val Loss: 0.0001 Acc: 0.0000

Epoch 9/9
----------
lr is 0.01
train Loss: 0.0000 Acc: 0.0000
val Loss: 0.0001 Acc: 0.0000

Training complete in 0m 15s
Best val Acc: 0.000000

Is there anything wrong with the given model _mnistnet.pth.tar?

rahafaljundi commented 6 years ago

Hi, what version of Pytorch are you using?

ericxian1997 commented 6 years ago

If you use Pytorch > 0.3, you should modify some code. You need to use tensor.item() to convert Pytorch tensor to python data type in some lines of code instead of directly add a tensor to a variable of python data type

mingzhang96 commented 6 years ago

Hi, what version of Pytorch are you using?

using 0.4.1

mingzhang96 commented 6 years ago

@rahafaljundi I try the model with new environment as follow:

but this problem still happened. Wondering if there is still anything wrong.

mingzhang96 commented 6 years ago

I am sorry that I miss the correct environment. Now everything goes right.