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
4aa6f545
Commit
4aa6f545
authored
8 years ago
by
tgupta6
Browse files
Options
Downloads
Patches
Plain Diff
make data reader single threaded
parent
d016894c
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
constants_crunchy.py
+1
-1
1 addition, 1 deletion
constants_crunchy.py
constants_vision_gpu_2.py
+3
-3
3 additions, 3 deletions
constants_vision_gpu_2.py
data/cropped_regions_cached_features.py
+10
-8
10 additions, 8 deletions
data/cropped_regions_cached_features.py
with
14 additions
and
12 deletions
constants_crunchy.py
+
1
−
1
View file @
4aa6f545
...
...
@@ -8,7 +8,7 @@ def mkdir_if_not_exists(dir_name):
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
'
global_output_dir
=
'
/
data
/tanmay/GenVQA
_
Exp_Results
'
global_experiment_dir
=
os
.
path
.
join
(
global_output_dir
,
...
...
This diff is collapsed.
Click to expand it.
constants_vision_gpu_2.py
+
3
−
3
View file @
4aa6f545
...
...
@@ -8,7 +8,7 @@ def mkdir_if_not_exists(dir_name):
experiment_name
=
'
QA_explicit_dot_pretrained_same_lr
'
#experiment_name = 'object_attribute_classifier_large_images'
# Global output directory (all subexperiments will be saved here)
global_output_dir
=
'
/
home/nfs/tgupta6/projects
/GenVQA
/
Exp_Results
/VQA
'
global_output_dir
=
'
/
data/tanmay
/GenVQA
_
Exp_Results
'
global_experiment_dir
=
os
.
path
.
join
(
global_output_dir
,
...
...
@@ -164,7 +164,7 @@ answer_obj_atr_loss_wt = 0.0
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
,
...
...
@@ -184,7 +184,7 @@ answer_model = os.path.join(
num_regions_with_labels
=
100
# Answer fine tune params
answer_fine_tune_from_iter
=
62
500
answer_fine_tune_from_iter
=
19
500
answer_fine_tune_from
=
answer_model
+
'
-
'
+
str
(
answer_fine_tune_from_iter
)
# Answer eval params
...
...
This diff is collapsed.
Click to expand it.
data/cropped_regions_cached_features.py
+
10
−
8
View file @
4aa6f545
...
...
@@ -87,20 +87,22 @@ class data():
print
'
Error in thread {}: {}
'
.
format
(
threading
.
current_thread
().
name
,
str
(
e
))
def
get_parallel
(
self
,
samples
):
batch_list
=
[
None
]
*
len
(
samples
)
worker_ids
=
range
(
len
(
samples
))
workers
=
[]
for
count
,
sample
in
enumerate
(
samples
):
worker
=
threading
.
Thread
(
target
=
self
.
get_single
,
args
=
(
sample
,
batch_list
,
worker_ids
[
count
]))
worker
.
setDaemon
(
True
)
worker
.
start
()
workers
.
append
(
worker
)
self
.
get_single
(
sample
,
batch_list
,
worker_ids
[
count
])
# worker = threading.Thread(
# target = self.get_single,
# args = (sample, batch_list, worker_ids[count]))
# worker.setDaemon(True)
# worker.start()
# workers.append(worker)
for
worker
in
workers
:
worker
.
join
()
#
for worker in workers:
#
worker.join()
batch_size
=
len
(
samples
)
batch
=
dict
()
...
...
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