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

Merge branch 'master' of gitlab-beta.engr.illinois.edu:Vision/GenVQA

Add obj_atr_loss_wt to constants file
parents ebb601ac 5093204d
No related branches found
No related tags found
No related merge requests found
......@@ -87,6 +87,7 @@ if __name__=='__main__':
constants.num_regions_with_labels,
constants.num_object_labels,
constants.num_attribute_labels,
constants.answer_obj_atr_loss_wt,
resnet_feat_dim=constants.resnet_feat_dim,
training=True)
......
......@@ -29,6 +29,7 @@ class graph_creator():
num_regions_w_labels,
num_object_labels,
num_attribute_labels,
obj_atr_loss_wt,
resnet_feat_dim=2048,
training=True):
self.im_h, self.im_w = image_size
......@@ -40,6 +41,7 @@ class graph_creator():
self.num_regions_w_labels = num_regions_w_labels
self.num_object_labels = num_object_labels
self.num_attribute_labels = num_attribute_labels
self.obj_atr_loss_wt = obj_atr_loss_wt
self.resnet_feat_dim = resnet_feat_dim
self.training = training
self.tf_graph = tf.Graph()
......@@ -369,7 +371,7 @@ class graph_creator():
self.regularization_loss = self.regularization()
self.total_loss = 0.0*(self.object_loss + 1000.0*self.attribute_loss) + \
self.total_loss = self.obj_atr_loss_wt*(self.object_loss + 1000.0*self.attribute_loss) + \
self.regularization_loss + \
self.answer_loss
......@@ -743,6 +745,7 @@ if __name__=='__main__':
constants.num_regions_with_labels,
constants.num_object_labels,
constants.num_attribute_labels,
constants.answer_obj_atr_loss_wt,
resnet_feat_dim=constants.resnet_feat_dim,
training=True)
......
......@@ -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_explicit_dot_joint_training_pretrained'
experiment_name = 'QA_explicit_dot_joint_training_pretrained_same_lr'
#experiment_name = 'object_attribute_classifier_large_images'
# Global output directory (all subexperiments will be saved here)
global_output_dir = '/home/tanmay/Code/GenVQA/Exp_Results/VQA'
......@@ -159,12 +159,13 @@ num_test_questions = 0
# Answer classifier training params
answer_batch_size = 50
answer_num_epochs = 10
answer_num_epochs = 4
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-4
answer_lr = 1e-3
answer_log_every_n_iter = 500
answer_output_dir = os.path.join(
global_experiment_dir,
......
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