diff --git a/constants_vision_gpu_1.py b/constants_vision_gpu_1.py index f3d87f0116cd7dd3521501a412bd1fdd61608836..dd75d168d035dbdc01d161253f0a619cd04dcaf3 100644 --- a/constants_vision_gpu_1.py +++ b/constants_vision_gpu_1.py @@ -5,7 +5,7 @@ def mkdir_if_not_exists(dir_name): if not os.path.exists(dir_name): os.mkdir(dir_name) -experiment_name = 'obj_atr_through_ans_mil' +experiment_name = 'obj_atr_through_ans_mil_wordvecl2' #experiment_name = 'object_attribute_classifier_large_images' # Global output directory (all subexperiments will be saved here) global_output_dir = '/data/tanmay/GenVQA_Exp_Results' @@ -121,7 +121,7 @@ region_fine_tune_from_iter = 3000 region_fine_tune_from = region_model + '-' + str(region_fine_tune_from_iter) # Object Attribute Classifier Evaluation Params -region_eval_on = 'val' # One of {'val','test','train'} +region_eval_on = 'train_held_out' # One of {'train_subset','train_held_out','test'} region_model_to_eval = region_model + '-' + '77500' region_attribute_scores_dirname = os.path.join( @@ -214,7 +214,7 @@ answer_fine_tune_from = answer_model + '-' + str(answer_fine_tune_from_iter) # Answer eval params answer_eval_on = 'val' -answer_model_to_eval = answer_model + '-69500' +answer_model_to_eval = answer_model + '-55000' answer_eval_data_json = os.path.join( answer_output_dir, diff --git a/object_attribute_classifier_cached_features/eval.py b/object_attribute_classifier_cached_features/eval.py index 17ccfe924645136d76688d266953641e5e145186..5b51587ecf11fed471288ccc1b7eada398ec55c8 100644 --- a/object_attribute_classifier_cached_features/eval.py +++ b/object_attribute_classifier_cached_features/eval.py @@ -291,8 +291,8 @@ if __name__=='__main__': initializer = create_initializer( graph, sess, - constants.pretrained_model) - #constants.answer_model_to_eval) + #constants.pretrained_model) + constants.answer_model_to_eval) #constants.region_model_to_eval) print 'Creating feed dict creator...' diff --git a/object_attribute_classifier_cached_features/inference.py b/object_attribute_classifier_cached_features/inference.py index 8a1887f0f133e8a8a998dcafb67cbc9a428cebe0..84b52cfeeda6d7beeef78cc896d10bcb3b3fee55 100644 --- a/object_attribute_classifier_cached_features/inference.py +++ b/object_attribute_classifier_cached_features/inference.py @@ -78,10 +78,10 @@ class ObjectAttributeInference(): out_dim, 'fc', func = None) - # fc2_out = layers.batch_norm( - # fc2_out, - # tf.constant(self.training)) - # fc2_out = tf.nn.relu(fc2_out) + fc2_out = layers.batch_norm( + fc2_out, + tf.constant(self.training)) + fc2_out = tf.nn.relu(fc2_out) return fc2_out @@ -108,10 +108,10 @@ class ObjectAttributeInference(): out_dim, 'fc', func = None) - # fc2_out = layers.batch_norm( - # fc2_out, - # tf.constant(self.training)) - # fc2_out = tf.nn.relu(fc2_out) + fc2_out = layers.batch_norm( + fc2_out, + tf.constant(self.training)) + fc2_out = tf.nn.relu(fc2_out) return fc2_out diff --git a/word2vec/word_vector_management.py b/word2vec/word_vector_management.py index cfeb8b7c32b89b2f41e6012da761df8133d50330..73f15e8574348d0a20ea6a346e2503f547856f79 100644 --- a/word2vec/word_vector_management.py +++ b/word2vec/word_vector_management.py @@ -43,6 +43,7 @@ class word_vector_manager(): 'word_vec_fc2', func = None) + tf.add_to_collection('to_regularize',word_vecs_fc2) return word_vecs_fc2 def init_word_vector_tensor(self):