code: def __init__(
      self,
      path,
      input_names=None,
      output_names=None,
      tf_session_config=None,
      jvalue=None,
      bigdl_type="float",
  ):
      if jvalue is not None:
          super(TFNet, self).__init__(jvalue, bigdl_type)
          return
  
      config_bytes = None
      if tf_session_config is not None:
          import tensorflow as tf
  
          assert isinstance(tf_session_config, tf.ConfigProto)
          tf_session_config.use_per_session_threads = True
          config_bytes = bytearray(
              tf_session_config.SerializeToString()
          )
      if input_names is None and output_names is None:
          if tf_session_config is None:
              super(TFNet, self).__init__(None, bigdl_type, path)
          else:
              super(TFNet, self).__init__(
                  None, bigdl_type, path, config_bytes
              )
  
      else:
          if isinstance(input_names, six.string_types):
              input_names = [input_names]
          if isinstance(output_names, six.string_types):
              output_names = [output_names]
          if tf_session_config is None:
              super(TFNet, self).__init__(
                  None, bigdl_type, path, input_names, output_names
              )
          else:
              super(TFNet, self).__init__(
                  None,
                  bigdl_type,
                  path,
                  input_names,
                  output_names,
                  config_bytes,
              )
  
imports: import os
  import sys
  import tempfile
  import numpy
  import six
  from pyspark import RDD
  from bigdl.nn.layer import Layer
  from zoo.common import JTensor
  from zoo.common.nncontext import getOrCreateSparkContext
  from zoo.common.utils import callZooFunc
  from zoo.feature.image import ImageSet
  from zoo.tfpark.tf_dataset import TFImageDataset, TFDataset
  import logging
  from zoo.util.utils import to_sample_rdd
label_desc: Use image node_id 1 to create a new TFNet object from inherited base classes: Layer with example: obj = TFNet(path, input_names, output_names, tf_session_config, jvalue, bigdl_type)