code: def main():
      parser = argparse.ArgumentParser()
      parser.add_argument(
          "model_name", choices=("mobilenetv2",), default="mobilenetv2"
      )
      parser.add_argument("pretrained_model")
      parser.add_argument("--n-class", type=int, default=1001)
      parser.add_argument("--depth-multiplier", type=float, default=1.0)
      parser.add_argument("output", nargs="?", default=None)
      args = parser.parse_args()
  
      model = MobileNetV2(
          args.n_class, depth_multiplier=args.depth_multiplier
      )
      load_mobilenetv2_from_tensorflow_checkpoint(
          model, args.pretrained_model
      )
  
      if args.output is None:
          output = "{}_{}_imagenet_convert.npz".format(
              args.model_name, args.depth_multiplier
          )
      else:
          output = args.output
      model.conv.conv.W.array /= 255.0  # scaling [0, 255] -> [0, 1.0]
      chainer.serializers.save_npz(output, model)
      print("output: ", output)
  
file_path: chainercv/examples/mobilenet/tfckpt2npz.py
imports: import argparse
  import chainer
  import tensorflow
  from chainercv.links import MobileNetV2
label_desc: Use image node_id 6 for calling a global function with example usage: main() without return types