code: def test_logit(self, seed):
      np.random.seed(seed)
      workspace.ResetWorkspace()
      n = 1
      m = 15361
      X = np.linspace(0, 1, num=m, dtype=np.float32)
  
      pred_net = caffe2_pb2.NetDef()
      pred_net.name = "pred"
      pred_net.external_input.append("X")
      pred_net.external_output.append("Y")
      pred_net.op.add().CopyFrom(
          core.CreateOperator("Logit", ["X"], ["Y"], eps=1e-6)
      )
      ref_net = caffe2_pb2.NetDef()
      ref_net.name = "ref"
      ref_net.external_input.append("X")
      ref_net.external_output.append("Y")
      ref_net.op.add().CopyFrom(
          core.CreateOperator(
              "LogitFakeFp16NNPI", ["X"], ["Y"], eps=1e-6
          )
      )
      print("REF NET = {}".format(ref_net))
  
      shape_hints = {"X": (n, m)}
      pred_net_onnxified = onnxifi_caffe2_net(
          pred_net,
          shape_hints,
          debug=True,
          adjust_batch=False,
          use_onnx=False,
      )
      num_onnxified_ops = sum(
          1 if o.type == "Onnxifi" else 0 for o in pred_net_onnxified.op
      )
      np.testing.assert_equal(num_onnxified_ops, 1)
      workspace.SwitchWorkspace("glow_test_ws", True)
      workspace.FeedBlob("X", X)
      workspace.CreateNet(ref_net)
      workspace.CreateNet(pred_net_onnxified)
      # Run Glow net
      workspace.RunNet(pred_net_onnxified.name)
      Y_glow = workspace.FetchBlob("Y")
      # Run caffe2 reference net
      workspace.RunNet(ref_net.name)
      Y_c2 = workspace.FetchBlob("Y")
  
      diff = np.abs(Y_c2 - Y_glow)
      if np.nanmax(diff) > 9e-3:
          np.save("/tmp/logit_diff", diff)
          np.save("/tmp/logit_result", Y_c2)
          print_test_debug_info(
              "Logit",
              {"X": X, "Y_c2": Y_c2, "Y_glow": Y_glow, "diff": diff},
          )
          assert 0
  
imports: import numpy
  import caffe2.python.fakelowp.init_shared_libs
  import datetime
  from hypothesis import given, settings
  from hypothesis import strategies
  from caffe2.proto import caffe2_pb2
  from caffe2.python import core
  from caffe2.python import workspace
  from caffe2.python.onnx.onnxifi import onnxifi_caffe2_net
  from caffe2.python.fakelowp.test_utils import print_test_debug_info
  from caffe2.python.fakelowp.test_utils import compute_ulp_error
  import caffe2.python.serialized_test.serialized_test_util
label_desc: Use image node_id 6 for calling the UnaryOpTest obj's underlying member method code with example usage: obj.test_logit(seed) without return types