code: def convert(cls, npy_model, fluid_path, outputs=None):
      fluid = import_fluid()
      shapes = cls.input_shapes()
      input_name = list(shapes.keys())[0]
      feed_data = {}
      for name, shape in list(shapes.items()):
          data_layer = fluid.layers.data(
              name=name, shape=shape, dtype="float32"
          )
          feed_data[name] = data_layer
  
      net = cls(feed_data)
      place = fluid.CPUPlace()
      exe = fluid.Executor(place)
      exe.run(fluid.default_startup_program())
      net.load(data_path=npy_model, exe=exe, place=place)
      output_vars = []
  
      model_filename = "model"
      params_filename = "params"
      if outputs is None:
          output_vars.append(net.get_output())
      else:
          if outputs[0] == "dump_all":
              model_filename = None
              params_filename = None
              output_vars.append(net.get_output())
          else:
              if type(outputs) is list:
                  for n in outputs:
                      assert (
                          n in net.layers
                      ), "not found layer with this name[%s]" % (n)
                      output_vars.append(net.layers[n])
  
      fluid.io.save_inference_model(
          fluid_path,
          [input_name],
          output_vars,
          exe,
          main_program=None,
          model_filename=model_filename,
          params_filename=params_filename,
      )
      return 0
  
imports: from __future__ import print_function
  from builtins import str
  from past.builtins import basestring
  from builtins import object
  import sys
  import os
  import math
  import numpy
label_desc: Use image node_id 3 for calling the LeNet obj's underlying member method code with example usage: obj.convert(cls, npy_model, fluid_path, outputs) and returns: int