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
725422dc
Commit
725422dc
authored
8 years ago
by
tgupta6
Browse files
Options
Downloads
Patches
Plain Diff
batch norm single features before adding
parent
2ba75798
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
answer_classifier_cached_features/inference.py
+19
-1
19 additions, 1 deletion
answer_classifier_cached_features/inference.py
with
19 additions
and
1 deletion
answer_classifier_cached_features/inference.py
+
19
−
1
View file @
725422dc
...
...
@@ -74,6 +74,7 @@ class AnswerInference():
obj_atr_qa_feat
=
[
None
]
*
self
.
batch_size
q_a_feat_list
=
[
None
]
*
self
.
batch_size
obj_atr_det_list
=
[
None
]
*
self
.
batch_size
single_feats_list
=
[
None
]
*
self
.
batch_size
for
j
in
xrange
(
self
.
batch_size
):
if
j
==
0
:
reuse_vars
=
False
...
...
@@ -175,6 +176,14 @@ class AnswerInference():
1
,
[
0
*
yes_no_feat_
,
q_feat
,
a_feat
])
single_feats_list
[
j
]
=
tf
.
concat
(
1
,
[
self
.
per_answer_avg_ans_noun_scores
[
j
],
self
.
per_answer_avg_ques_noun_scores
[
j
],
self
.
per_answer_avg_ans_adj_scores
[
j
],
self
.
per_answer_avg_ques_adj_scores
[
j
],
])
# obj_atr_qa_feat[j] = tf.expand_dims(
# obj_atr_qa_feat[j],
...
...
@@ -187,6 +196,10 @@ class AnswerInference():
self
.
q_a_feat_packed
=
tf
.
concat
(
0
,
q_a_feat_list
)
self
.
single_feats_packed
=
tf
.
concat
(
0
,
single_feats_list
)
self
.
obj_atr_det_fc_bn
=
self
.
fc_bn
(
self
.
obj_atr_det_packed
,
...
...
@@ -198,9 +211,14 @@ class AnswerInference():
2500
,
'
q_a_feat_fc_bn
'
)
self
.
single_feats_fc_bn
=
self
.
fc_bn
(
self
.
single_feats_packed
,
2500
,
'
single_feats_fc_bn
'
)
# (25*18 x 2500)
self
.
per_answer_feat
=
tf
.
nn
.
relu
(
self
.
obj_atr_det_fc_bn
+
self
.
q_a_feat_fc_bn
)
self
.
obj_atr_det_fc_bn
+
self
.
q_a_feat_fc_bn
+
self
.
single_feats_fc_bn
)
# (25*18 x 1)
self
.
answer_score
=
self
.
fc_bn
(
...
...
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