XifengGuo / CapsNet-Pytorch

Pytorch implementation for NIPS2017 paper `Dynamic Routing Between Capsules`

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

For 7 number of classes

NidhiKan opened this issue · comments

def test(model, test_loader, args):
model.eval()
test_loss = 0
correct = 0
for x, y in test_loader:
y = torch.zeros(y.size(0), 10).scatter_(1, y.view(-1, 1), 1.)
x, y = Variable(x.cuda(), volatile=True), Variable(y.cuda())

plz check the for loop statements. how the first line of y will be changed for 7 number of classes.