(self)
Builds the image model subgraph and generates image embeddings.

    Inputs:
      self.images

    Outputs:
      self.image_embeddings
Builds the image model subgraph and generates image embeddings.
Builds the image model subgraph and generates image embeddings .
def build_image_embeddings(self):
    """Builds the image model subgraph and generates image embeddings.

    Inputs:
      self.images

    Outputs:
      self.image_embeddings
    """
    inception_output = image_embedding.inception_v3(
        self.images,
        trainable=self.train_inception,
        is_training=self.is_training())
    self.inception_variables = tf.get_collection(
        tf.GraphKeys.GLOBAL_VARIABLES, scope="InceptionV3")

    # Map inception output into embedding space.
    with tf.variable_scope("image_embedding") as scope:
      image_embeddings = tf.contrib.layers.fully_connected(
          inputs=inception_output,
          num_outputs=self.config.embedding_size,
          activation_fn=None,
          weights_initializer=self.initializer,
          biases_initializer=None,
          scope=scope)

    # Save the embedding size in the graph.
    tf.constant(self.config.embedding_size, name="embedding_size")

    self.image_embeddings = image_embeddings
def build_image_embeddings ( self ) : inception_output = image_embedding . inception_v3 ( self . images , trainable = self . train_inception , is_training = self . is_training ( ) ) self . inception_variables = tf . get_collection ( tf . GraphKeys . GLOBAL_VARIABLES , scope = "InceptionV3" ) # Map inception output into embedding space. with tf . variable_scope ( "image_embedding" ) as scope : image_embeddings = tf . contrib . layers . fully_connected ( inputs = inception_output , num_outputs = self . config . embedding_size , activation_fn = None , weights_initializer = self . initializer , biases_initializer = None , scope = scope ) # Save the embedding size in the graph. tf . constant ( self . config . embedding_size , name = "embedding_size" ) self . image_embeddings = image_embeddings