Commit ae4e779a authored by Yaoyao Liu's avatar Yaoyao Liu
Browse files

Update meta_trainer.py

parent 801b6c53
......@@ -362,8 +362,7 @@ class MetaTrainer(object):
p = args.shot * args.way
data_shot, data_query = data[:p], data[p:]
data_shot = data_shot.unsqueeze(0).repeat(num_gpu, 1, 1, 1, 1)
logits = model(
(data_shot, data_query))
logits = model.meta_forward(data_shot, data_query)
loss = F.cross_entropy(logits, label)
acc = count_acc(logits, label)
vl.add(loss.item())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment