code: def test_adam(self, inputs, ITER, LR, beta1, beta2, epsilon, gc, dc):
      param, mom1, mom2, grad = inputs
      ITER = np.array([ITER], dtype=np.int64)
      LR = np.array([LR], dtype=np.float32)
      mom2 = np.absolute(mom2)
      op = core.CreateOperator(
          "Adam",
          ["param", "mom1", "mom2", "grad", "lr", "iter"],
          ["output_param", "output_mom1", "output_mom2"],
          beta1=beta1,
          beta2=beta2,
          epsilon=epsilon,
      )
      # Iter lives on the CPU
      input_device_options = {"iter": hu.cpu_do, "lr": hu.cpu_do}
  
      self.assertDeviceChecks(
          dc,
          op,
          [param, mom1, mom2, grad, LR, ITER],
          [0],
          input_device_options=input_device_options,
          threshold=0.001,
      )
  
file_path: pytorch/caffe2/python/ideep/adam_op_test.py
imports: import numpy
  import hypothesis.strategies
  import unittest
  import caffe2.python.hypothesis_test_util
  from caffe2.python import core, workspace
  from hypothesis import given
  import caffe2.python.ideep_test_util
label_desc: Use image node_id 1 for calling the TestAdamOps obj's underlying member method code with example usage: obj.test_adam(inputs, ITER, LR, beta1, beta2, epsilon, gc, dc) without return types