avec torch.no_grad () si condition
with torch.set_grad_enabled(not no_grad_condition):
out=network(input)
Bored Coder
with torch.set_grad_enabled(not no_grad_condition):
out=network(input)