Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GenVQA
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vision
GenVQA
Commits
2c4d564e
Commit
2c4d564e
authored
8 years ago
by
tgupta6
Browse files
Options
Downloads
Patches
Plain Diff
add new constants_crunchy
parent
db949c45
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
constants_crunchy.py
+20
-11
20 additions, 11 deletions
constants_crunchy.py
with
20 additions
and
11 deletions
constants_crunchy.py
+
20
−
11
View file @
2c4d564e
...
@@ -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_
feat
s
'
##########################################################################
##########################################################################
# 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-
10
2000
'
'
model-
7
2000
'
##########################################################################
##########################################################################
# 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
=
4
00
region_queue_size
=
3
00
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
=
Tru
e
answer_train_from_scratch
=
Fals
e
answer_batch_size
=
50
answer_batch_size
=
50
answer_num_epochs
=
20
answer_num_epochs
=
20
answer_queue_size
=
5
00
answer_queue_size
=
2
00
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
+
'
-
43
000
'
answer_model_to_eval
=
answer_model
+
'
-
68
000
'
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
'
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment