From 3862a0bd191518e0126cb8577371c0d996fc281c Mon Sep 17 00:00:00 2001 From: tgupta6 <tgupta6@illinois.edu> Date: Mon, 17 Oct 2016 11:58:26 -0500 Subject: [PATCH] disconnect word vectors and obj/atr classifiers --- .../inference.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/object_attribute_classifier_cached_features/inference.py b/object_attribute_classifier_cached_features/inference.py index 84b52cf..3ebfeb1 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, -- GitLab