(self, input_size, network_fn, model_path, net_depth, net_width)
Parameters
    ----------
    input_size : int
      Number of joints to be used, e.g. 21, 42.
    network_fn : function
      Network function from `network.py`.
    model_path : str
      Path to the trained model.
    net_depth : int
      Number of layers.
    net_width : int
      Number of neurons in each layer.
Parameters
    ----------
    input_size : int
      Number of joints to be used, e.g. 21, 42.
    network_fn : function
      Network function from `network.py`.
    model_path : str
      Path to the trained model.
    net_depth : int
      Number of layers.
    net_width : int
      Number of neurons in each layer.
Parameters ---------- input_size : int Number of joints to be used e . g . 21 42 . network_fn : function Network function from network . py . model_path : str Path to the trained model . net_depth : int Number of layers . net_width : int Number of neurons in each layer .
def __init__(self, input_size, network_fn, model_path, net_depth, net_width):
    """
    Parameters
    ----------
    input_size : int
      Number of joints to be used, e.g. 21, 42.
    network_fn : function
      Network function from `network.py`.
    model_path : str
      Path to the trained model.
    net_depth : int
      Number of layers.
    net_width : int
      Number of neurons in each layer.
    """
    self.graph = tf.Graph()
    with self.graph.as_default():
      self.input_ph = tf.placeholder(tf.float32, [1, input_size, 3])
      with tf.name_scope('network'):
        self.theta = \
          network_fn(self.input_ph, net_depth, net_width, training=False)[0]
        config = tf.ConfigProto()
        config.gpu_options.allow_growth = True
        self.sess = tf.Session(config=config)
      tf.train.Saver().restore(self.sess, model_path)
def __init__ ( self , input_size , network_fn , model_path , net_depth , net_width ) : self . graph = tf . Graph ( ) with self . graph . as_default ( ) : self . input_ph = tf . placeholder ( tf . float32 , [ 1 , input_size , 3 ] ) with tf . name_scope ( 'network' ) : self . theta = network_fn ( self . input_ph , net_depth , net_width , training = False ) [ 0 ] config = tf . ConfigProto ( ) config . gpu_options . allow_growth = True self . sess = tf . Session ( config = config ) tf . train . Saver ( ) . restore ( self . sess , model_path )