code: def print_intermediate_result(self, layer_name, if_transpose=False):
      internals = self.model.symbol.get_internals()
      intermediate_output = internals[layer_name + "_output"]
      test_model = mx.mod.Module(
          symbol=intermediate_output,
          context=mx.cpu(),
          data_names=["data"],
      )
      if (
          self.args.preprocess == "vgg19"
          or self.args.preprocess == "inception_v1"
      ):
          test_model.bind(
              for_training=False,
              data_shapes=[("data", (1, 3, 224, 224))],
          )
      elif (
          "resnet" in self.args.preprocess
          or self.args.preprocess == "inception_v3"
      ):
          test_model.bind(
              for_training=False,
              data_shapes=[("data", (1, 3, 299, 299))],
          )
      else:
          assert False
  
      arg_params, aux_params = self.model.get_params()
  
      test_model.set_params(
          arg_params=arg_params,
          aux_params=aux_params,
          allow_missing=True,
          allow_extra=True,
      )
      test_model.forward(Batch([mx.nd.array(self.data)]))
      intermediate_output = test_model.get_outputs()[0].asnumpy()
  
      super(TestMXNet, self).print_intermediate_result(
          intermediate_output, if_transpose
      )
  
file_path: MMdnn/mmdnn/conversion/examples/mxnet/imagenet_test.py
imports: from collections import namedtuple
  import numpy
  from mmdnn.conversion.examples.imagenet_test import TestKit
  import mxnet
label_desc: Use image node_id 5 for calling the TestMXNet obj's underlying member method code with example usage: obj.print_intermediate_result(layer_name, if_transpose) without return types