data = data.cuda(["input", "pos", "index", "weight", "target"])
data = data.to_variable()
optimizer.zero_grad()
output = model(data.input, data.pos, data.adj)
print(output.size())
loss = F.nll_loss(output, data.target)
loss.backward()
optimizer.step()
After Change
model.train()
for data in train_loader:
data = data.cuda().to_variable()
optimizer.zero_grad()
output = model(data)
loss = F.nll_loss(output, data.target)