how to calculate the size of a model in memory in torch.no_grad() code example
Example: with torch.no_grad() if condition
with torch.set_grad_enabled(not no_grad_condition):
out=network(input)
with torch.set_grad_enabled(not no_grad_condition):
out=network(input)