diff --git a/answer_classifier_cached_features/train.py b/answer_classifier_cached_features/train.py index 1db0b33e29492b948d8fa9f1a57756d11daaf193..e6de4310b452630fa2df61618cb5f7dfff3c5590 100644 --- a/answer_classifier_cached_features/train.py +++ b/answer_classifier_cached_features/train.py @@ -476,6 +476,7 @@ def create_vqa_batch_generator(): resnet_feat_dim=constants.resnet_feat_dim) num_train_subset_questions = len(data_mgr.qids) + print num_train_subset_questions index_generator = tftools.data.random( constants.answer_batch_size, diff --git a/constants_crunchy.py b/constants_crunchy.py index 099855102918f545a806a1f3ef10f2ee28cce5d1..6d46dad79de04b165a1f4bf34012ab30e906a127 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_joint_pretrain_genome_split' +experiment_name = 'object_attribute_classifier_large_images_vqa_split' #'QA_joint_pretrain_genome_split' # Global output directory (all subexperiments will be saved here) global_output_dir = '/home/tanmay/Code/GenVQA/Exp_Results/VQA' @@ -128,7 +128,7 @@ region_model_accuracies_txt = os.path.join( 'model_accuracies.txt') # Object Attribute Classifier Evaluation Params -region_eval_on = 'train_subset' # One of {'test','train_held_out','train_subset'} +region_eval_on = 'train_held_out' # One of {'test','train_held_out','train_subset'} region_model_to_eval = region_model + '-' + '80000' region_attribute_scores_dirname = os.path.join( @@ -189,13 +189,13 @@ vqa_answer_vocab_json = os.path.join( # Answer classifier training params answer_batch_size = 50 -answer_num_epochs = 4 +answer_num_epochs = 6 answer_offset = 0 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 = 1e-4 answer_log_every_n_iter = 500 answer_output_dir = os.path.join( global_experiment_dir, @@ -220,7 +220,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 + '-18500' +answer_model_to_eval = answer_model + '-42000' vqa_results_dir = os.path.join( answer_output_dir, @@ -238,7 +238,7 @@ answer_eval_results_json = os.path.join( # Select best model models_dir = answer_output_dir -start_model = 1000 +start_model = 40000 step_size = 2000 model_accuracies_txt = os.path.join( answer_output_dir, diff --git a/visual_util/visualize_relevance.py b/visual_util/visualize_relevance.py index 72b07c7dce7dca0bc79c71073435ecc3cbcd33cf..17b947eb8fca36cddc376ddb9132f114ee3933cc 100644 --- a/visual_util/visualize_relevance.py +++ b/visual_util/visualize_relevance.py @@ -200,13 +200,13 @@ if __name__=='__main__': 'mscoco_val2014_annotations_with_parsed_questions.json') exp_dir = '/home/tanmay/Code/GenVQA/Exp_Results/VQA/' + \ - 'QA_explicit_dot_joint_training_pretrained_same_lr/' + 'QA_joint_pretrain_genome_split/' eval_data_json = os.path.join( exp_dir, - 'answer_classifiers/eval_val_rest_data.json') + 'answer_classifiers/Results/eval_val_data.json') - output_dir = os.path.join(exp_dir, 'qual_results_val_rest_conf') + output_dir = os.path.join(exp_dir, 'qual_results_val_conf') if not os.path.exists(output_dir): os.mkdir(output_dir)