diff --git a/object_attribute_classifier_cached_features/inference.py b/object_attribute_classifier_cached_features/inference.py index 84b52cfeeda6d7beeef78cc896d10bcb3b3fee55..3ebfeb1bcfa32ea9334a255a8d829cfa65876ede 100644 --- a/object_attribute_classifier_cached_features/inference.py +++ b/object_attribute_classifier_cached_features/inference.py @@ -34,18 +34,28 @@ class ObjectAttributeInference(): self.attribute_embed = self.add_attribute_graph(self.avg_pool_feat) with tf.variable_scope('object_score_graph'): - self.object_scores = tf.matmul( + # self.object_scores = tf.matmul( + # self.object_embed, + # tf.transpose(self.object_label_vectors)) + self.object_scores = layers.full( self.object_embed, - tf.transpose(self.object_label_vectors)) + constants.num_object_labels, + 'obj_class_fc_layer', + func=None) self.object_prob = tf.nn.softmax( self.object_scores, name = 'object_prob') with tf.variable_scope('attribute_score_graph'): - self.attribute_scores = tf.matmul( + # self.attribute_scores = tf.matmul( + # self.attribute_embed, + # tf.transpose(self.attribute_label_vectors)) + self.attribute_scores = layers.full( self.attribute_embed, - tf.transpose(self.attribute_label_vectors)) + constants.num_attribute_labels, + 'atr_class_fc_layer', + func=None) self.attribute_prob = tf.sigmoid( self.attribute_scores,