0
Q:

with torch.no_grad()

The wrapper "with torch.no_grad()" 
temporarily set all the requires_grad flag to false.
1
  with torch.set_grad_enabled(not no_grad_condition):
    out=network(input)
0

New to Communities?

Join the community