val_acc is always zeros since "correct" is a tensor with int type. You should "correct" into a float type before computing "correct / len(test_loader.dataset)".
For example,
add this in line 127 in capsulenet.py : correct = correct.numpy().astype(float)
val_acc is always zeros since "correct" is a tensor with int type. You should "correct" into a float type before computing "correct / len(test_loader.dataset)".
For example,
add this in line 127 in capsulenet.py : correct = correct.numpy().astype(float)