PyTorch Forums
Can't call numpy() on Variable that requires grad. Use var.detach().numpy() instead
dzzxjl
(Howie Yang)
July 12, 2019, 8:07am
3
maybe you can put
with torch.no_grad():
before your code, and try again
1 Like
show post in topic