parameters: (self)
docstring: Inits PaletteEmbeddingModel with the demo saved model.
docstring_summary: Inits PaletteEmbeddingModel with the demo saved model.
docstring_tokens: Inits PaletteEmbeddingModel with the demo saved model .
function: def __init__(self):
      """Inits PaletteEmbeddingModel with the demo saved model."""
      self._sess = tf.Session(graph=tf.Graph())
      meta_graph_def = tf.saved_model.loader.load(self._sess, [TAG], MODEL_DIR)
      signature = meta_graph_def.signature_def
      in_tensor_name = signature[SIGNATURE_KEY].inputs[IN_TENSOR_KEY].name
      out_tensor_name = signature[SIGNATURE_KEY].outputs[OUT_TENSOR_KEY].name
      self._in_tensor = self._sess.graph.get_tensor_by_name(in_tensor_name)
      self._out_tensor = self._sess.graph.get_tensor_by_name(out_tensor_name)
function_tokens: def __init__ ( self ) : self . _sess = tf . Session ( graph = tf . Graph ( ) ) meta_graph_def = tf . saved_model . loader . load ( self . _sess , [ TAG ] , MODEL_DIR ) signature = meta_graph_def . signature_def in_tensor_name = signature [ SIGNATURE_KEY ] . inputs [ IN_TENSOR_KEY ] . name out_tensor_name = signature [ SIGNATURE_KEY ] . outputs [ OUT_TENSOR_KEY ] . name self . _in_tensor = self . _sess . graph . get_tensor_by_name ( in_tensor_name ) self . _out_tensor = self . _sess . graph . get_tensor_by_name ( out_tensor_name )