code: def build_network(image_input, num_classes=1001, is_training=False):
      net_in = tl.layers.InputLayer(image_input, name="input_layer")
      with slim.arg_scope(inception_v3_arg_scope()):
          network = tl.layers.SlimNetsLayer(
              prev_layer=net_in,
              slim_layer=inception_v3,
              slim_args={
                  "num_classes": num_classes,
                  "is_training": is_training,
              },
              name="InceptionV3",
          )
  
      predictions = tf.nn.sigmoid(network.outputs, name="Predictions")
      return network, predictions
  
imports: import argparse
  import logging
  import multiprocessing
  import os
  import random
  import sys
  import time
  from xml.etree import ElementTree
  import numpy
  import tensorflow
  from tensorflow.contrib import slim
  from tensorflow.contrib.slim.python.slim.nets.inception_v3 import inception_v3, inception_v3_arg_scope
  from tensorflow.python.framework.errors_impl import OutOfRangeError
  from tensorflow.python.training import session_run_hook
  from tensorflow.python.training.basic_session_run_hooks import StopAtStepHook
  from tensorflow.python.training.monitored_session import SingularMonitoredSession
  import tensorlayer
label_desc: Use image node_id 6 for calling a global function with example usage: build_network(image_input, num_classes, is_training) and returns: network,  predictions