torch.is_grad_enabled torch.is_grad_enabled() Returns True if grad mode is currently enabled. Назадtorch.is_floating_point