class_docstr: This class tests all autograd-related functionality.
docstr: Tests running autograd on the same input repeatedly.
docstr_tok: ["Tests","running","autograd","on","the","same","input","repeatedly","."]
code: def test_autograd_repetition(self) -> None:
      """Tests running autograd on the same input repeatedly."""
  
      # create test case:
      input = get_random_test_tensor(size=(12, 5), is_float=True)
      input.requires_grad = True
      encr_input = crypten.cryptensor(input, requires_grad=True)
  
      # re-use the same input multiple times:
      for _ in range(7):
          # perform forward pass:
          output = input.exp().sum()
          encr_output = encr_input.exp().sum()
          self._check(encr_output._tensor, output, "forward failed")
          self.assertTrue(
              encr_output.requires_grad, "requires_grad incorrect"
          )
  
          # perform backward computation:
          output.backward()
          encr_output.backward()
          self._check(encr_input.grad, input.grad, "backward failed")
  
imports: import logging
  import random
  import unittest
  import crypten
  import crypten.gradients
  import torch
  from crypten.common.tensor_types import is_float_tensor
  from crypten.config import cfg
  from crypten.gradients import AutogradContext, AutogradFunction
  from test.multiprocess_test_case import get_random_test_tensor, MultiProcessTestCase
label_desc: Use image node_id 11 for calling the TestAutograd obj's underlying member method code with example usage: obj.test_autograd_repetition() without return types