Skip to content

For 7 number of classes #7

@NidhiKan

Description

@NidhiKan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions