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

add new constants_crunchy

parent db949c45
No related branches found
No related tags found
No related merge requests found
...@@ -5,14 +5,14 @@ def mkdir_if_not_exists(dir_name): ...@@ -5,14 +5,14 @@ def mkdir_if_not_exists(dir_name):
if not os.path.exists(dir_name): if not os.path.exists(dir_name):
os.mkdir(dir_name) os.mkdir(dir_name)
experiment_name = 'trial_new_rel_feat' experiment_name = 'ans_through_obj_atr_pretrained_no_rel_bin_feats'
########################################################################## ##########################################################################
# Machine Specific Paths # # Machine Specific Paths #
########################################################################## ##########################################################################
# Global output directory (all subexperiments will be saved here) # Global output directory (all subexperiments will be saved here)
global_output_dir = '/home/tanmay/Code/GenVQA/Exp_Results/VQA' global_output_dir = '/home/tanmay/Code/GenVQA/Exp_Results/models_cvpr/'
global_experiment_dir = os.path.join( global_experiment_dir = os.path.join(
global_output_dir, global_output_dir,
...@@ -42,9 +42,9 @@ word2vec_binary = '/home/tanmay/Code/word2vec/word2vec-api-master/' + \ ...@@ -42,9 +42,9 @@ word2vec_binary = '/home/tanmay/Code/word2vec/word2vec-api-master/' + \
vqa_basedir = '/home/ssd/VQA/' vqa_basedir = '/home/ssd/VQA/'
# Pretrained obj atr model to be restored # Pretrained obj atr model to be restored
pretrained_model = '/home/tanmay/Code/GenVQA/Exp_Results/VQA/' + \ pretrained_model = '/home/tanmay/Code/GenVQA/Exp_Results/models_cvpr/' + \
'object_attribute_classifier_wordvec_xform/' + \ 'obj_atr_through_none_single_feat/answer_classifiers/' + \
'object_attribute_classifiers/model-102000' 'model-72000'
########################################################################## ##########################################################################
# Model Parameters # # Model Parameters #
...@@ -93,6 +93,10 @@ regions_json = os.path.join( ...@@ -93,6 +93,10 @@ regions_json = os.path.join(
data_absolute_path, data_absolute_path,
'restructured/region_with_hypernym_labels.json') 'restructured/region_with_hypernym_labels.json')
eval_regions_json = os.path.join(
data_absolute_path,
'restructured/region_with_labels.json')
mean_image_filename = os.path.join( mean_image_filename = os.path.join(
data_absolute_path, data_absolute_path,
'restructured/mean_image.jpg') 'restructured/mean_image.jpg')
...@@ -132,7 +136,7 @@ region_model = os.path.join( ...@@ -132,7 +136,7 @@ region_model = os.path.join(
# Object Attribute Classifier Training Params # Object Attribute Classifier Training Params
region_batch_size = 200 region_batch_size = 200
region_num_epochs = 20 region_num_epochs = 20
region_queue_size = 400 region_queue_size = 300
region_regularization_coeff = 1e-5 region_regularization_coeff = 1e-5
region_lr = 1e-3 region_lr = 1e-3
...@@ -169,7 +173,12 @@ region_attribute_scores_dirname = os.path.join( ...@@ -169,7 +173,12 @@ region_attribute_scores_dirname = os.path.join(
region_output_dir, region_output_dir,
'attribute_scores') 'attribute_scores')
region_object_scores_dirname = os.path.join(
region_output_dir,
'object_scores')
mkdir_if_not_exists(region_attribute_scores_dirname) mkdir_if_not_exists(region_attribute_scores_dirname)
mkdir_if_not_exists(region_object_scores_dirname)
########################################################################## ##########################################################################
# VQA Parameters # # VQA Parameters #
...@@ -253,11 +262,11 @@ answer_model = os.path.join( ...@@ -253,11 +262,11 @@ answer_model = os.path.join(
'model') 'model')
# Answer classifier training params # Answer classifier training params
answer_train_from_scratch = True answer_train_from_scratch = False
answer_batch_size = 50 answer_batch_size = 50
answer_num_epochs = 20 answer_num_epochs = 20
answer_queue_size = 500 answer_queue_size = 200
answer_regularization_coeff = 1e-5 answer_regularization_coeff = 1e-5
answer_lr = 1e-3 answer_lr = 1e-3
...@@ -285,8 +294,8 @@ model_accuracies_txt = os.path.join( ...@@ -285,8 +294,8 @@ model_accuracies_txt = os.path.join(
'model_accuracies.txt') 'model_accuracies.txt')
# Answer eval params # Answer eval params
answer_eval_on = 'testdev' answer_eval_on = 'val'
answer_model_to_eval = answer_model + '-43000' answer_model_to_eval = answer_model + '-68000'
vqa_results_dir = os.path.join( vqa_results_dir = os.path.join(
answer_output_dir, answer_output_dir,
...@@ -315,6 +324,6 @@ raw_vqa_test_ques_json = os.path.join( ...@@ -315,6 +324,6 @@ raw_vqa_test_ques_json = os.path.join(
vqa_basedir, vqa_basedir,
'MultipleChoice_mscoco_test2015_questions.json') 'MultipleChoice_mscoco_test2015_questions.json')
raw_vqa_val_anno_json = os.path.join( raw_vqa_test_anno_json = os.path.join(
vqa_basedir, vqa_basedir,
'mscoco_test2015_annotations.json') 'mscoco_test2015_annotations.json')
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