From 97d8c1eda0a57c4faaa21e20441611382f2daa68 Mon Sep 17 00:00:00 2001 From: tgupta6 <tgupta6@illinois.edu> Date: Mon, 19 Sep 2016 15:53:23 -0500 Subject: [PATCH] wrap_elementwise_multiply --- answer_classifier_cached_features/inference.py | 2 +- constants_crunchy.py | 12 ++++++------ object_attribute_classifier_cached_features/eval.py | 3 ++- visual_util/visualize_relevance.py | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/answer_classifier_cached_features/inference.py b/answer_classifier_cached_features/inference.py index 1011142..d599de1 100644 --- a/answer_classifier_cached_features/inference.py +++ b/answer_classifier_cached_features/inference.py @@ -38,7 +38,7 @@ class AnswerInference(): else: reuse_vars = True - num_regions = self.object_feat[j].get_shape()[0].value + num_regions = 100 q_feat = tf.reshape( self.question_vert_concat[j], diff --git a/constants_crunchy.py b/constants_crunchy.py index 6ae0955..9ae185b 100644 --- a/constants_crunchy.py +++ b/constants_crunchy.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 = 'QA_classifier_joint_pretrain_wordvec_xform' #'QA_joint_pretrain_genome_split' +experiment_name = 'QA_classifier_joint_pretrain_wordvec_xform_large_obj_atr_wt' #'QA_joint_pretrain_genome_split' # Global output directory (all subexperiments will be saved here) global_output_dir = '/home/tanmay/Code/GenVQA/Exp_Results/VQA' @@ -195,7 +195,7 @@ answer_obj_atr_loss_wt = 0.1 answer_regularization_coeff = 1e-5 answer_queue_size = 500 answer_embedding_dim = 600 -answer_lr = 1e-3 +answer_lr = 1.0*1e-3 answer_log_every_n_iter = 500 answer_output_dir = os.path.join( global_experiment_dir, @@ -215,12 +215,12 @@ answer_model = os.path.join( num_regions_with_labels = 100 # Answer fine tune params -answer_fine_tune_from_iter = 13000 +answer_fine_tune_from_iter = 29500 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 + '-20000' +answer_model_to_eval = answer_model + '-28000' vqa_results_dir = os.path.join( answer_output_dir, @@ -238,8 +238,8 @@ answer_eval_results_json = os.path.join( # Select best model models_dir = answer_output_dir -start_model = 40000 -step_size = 2000 +start_model = 20000 +step_size = 4000 model_accuracies_txt = os.path.join( answer_output_dir, 'model_accuracies.txt') diff --git a/object_attribute_classifier_cached_features/eval.py b/object_attribute_classifier_cached_features/eval.py index a022e2a..17ccfe9 100644 --- a/object_attribute_classifier_cached_features/eval.py +++ b/object_attribute_classifier_cached_features/eval.py @@ -291,8 +291,9 @@ if __name__=='__main__': initializer = create_initializer( graph, sess, + constants.pretrained_model) #constants.answer_model_to_eval) - constants.region_model_to_eval) + #constants.region_model_to_eval) print 'Creating feed dict creator...' feed_dict_creator = train.create_feed_dict_creator(graph.plh) diff --git a/visual_util/visualize_relevance.py b/visual_util/visualize_relevance.py index be332af..695b6d3 100644 --- a/visual_util/visualize_relevance.py +++ b/visual_util/visualize_relevance.py @@ -200,7 +200,7 @@ if __name__=='__main__': 'mscoco_val2014_annotations_with_parsed_questions.json') exp_dir = '/home/tanmay/Code/GenVQA/Exp_Results/VQA/' + \ - 'QA_classifier_wordvec_xform/' + 'QA_classifier_joint_pretrain_wordvec_xform/' eval_data_json = os.path.join( exp_dir, -- GitLab