code: def test_fp16_output(self):
      nelem = 278011
  
      tensor = torch.rand(nelem, dtype=torch.float, device="cuda")
      ref_param, tst_param, ref_optim, tst_optim = self.gen_param_optim(
          [tensor], self.options
      )
  
      fp16_param = torch.nn.Parameter(tensor.clone().half())
  
      for i in range(self.iters):
          half_grads = self.gen_mixed_grad(ref_param, tst_param)
          ref_optim.step()
          tst_optim.step(grads=half_grads, output_params=[fp16_param])
  
          max_abs_diff, max_rel_diff = self.get_max_diff(
              ref_param, tst_param
          )
          self.assertLessEqual(max_abs_diff, self.max_abs_diff)
          self.assertLessEqual(max_rel_diff, self.max_rel_diff)
  
          max_abs_diff, max_rel_diff = self.get_max_diff(
              tst_param, [fp16_param.float()]
          )
          self.assertLessEqual(max_abs_diff, self.max_abs_diff)
          self.assertLessEqual(max_rel_diff, self.max_rel_diff)
  
imports: from itertools import product
  import random
  import unittest
  import torch
  import apex
label_desc: Use image node_id 8 for calling the TestFusedAdam obj's underlying member method code with example usage: obj.test_fp16_output() without return types