Dragon API Dragon v0.3.0 Python no_grad¶ class dragon.vm.torch.no_grad[source]¶ Context-manager to disable gradient calculation. Examples: x = torch.ones(2, 3, requires_grad=True) with torch.no_grad(): y = x + 1 y.backward() # RuntimeError __init__¶ no_grad.__init__()[source]¶ Create a no_grad context manager.