code: def main():
      parser = argparse.ArgumentParser(description="Export")
      parser.add_argument(
          "--arch",
          "-a",
          type=str,
          required=True,
          choices=archs.keys(),
          help="Arch name. models: " + ", ".join(archs.keys()) + ".",
      )
      parser.add_argument(
          "--out-dir",
          "-o",
          type=str,
          required=True,
          help="Output directory name. "
          "chainer_model.prototxt, chainer_model.caffemodel"
          " will be created in it",
      )
      args = parser.parse_args()
  
      if not os.path.exists(args.out_dir):
          print("Created output directory: " + args.out_dir)
          os.mkdir(args.out_dir)
      else:
          print("Overwriting the existing directory: " + args.out_dir)
      if not os.path.isdir(args.out_dir):
          raise ValueError(
              args.out_dir + " exists but not a directory!"
          )
  
      print("load model")
      model, input = get_network_for_imagenet(args.arch)
  
      print("convert to caffe model")
      caffe.export(model, [input], args.out_dir, True)
  
file_path: chainer/examples/caffe_export/export.py
imports: import argparse
  import os
  import numpy
  import chainer
  from chainer.exporters import caffe
  from chainer.links.model.vision import googlenet
  from chainer.links.model.vision import resnet
  from chainer.links.model.vision import vgg
label_desc: Use image node_id 2 for calling a global function with example usage: main() without return types