Skip to content
Snippets Groups Projects
Commit ab98b61f authored by tgupta6's avatar tgupta6
Browse files

l2 on word vectors and put back relu and bn in obj atr network

parent e4728984
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
......@@ -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...'
......
......@@ -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
......
......@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment