Skip to content

Commit e1ac015

Browse files
author
Alexander Gorban
committed
Add the missing is_training to batch_norm and dropout.
1 parent d07447a commit e1ac015

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

research/attention_ocr/python/model.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,11 @@ def conv_tower_fn(self, images, is_training=True, reuse=None):
201201
with tf.variable_scope('conv_tower_fn/INCE'):
202202
if reuse:
203203
tf.get_variable_scope().reuse_variables()
204-
with slim.arg_scope(inception.inception_v3_arg_scope()):
205-
net, _ = inception.inception_v3_base(
206-
images, final_endpoint=mparams.final_endpoint)
204+
with slim.arg_scope(
205+
[slim.batch_norm, slim.dropout], is_training=is_training):
206+
with slim.arg_scope(inception.inception_v3_arg_scope()):
207+
net, _ = inception.inception_v3_base(
208+
images, final_endpoint=mparams.final_endpoint)
207209
return net
208210

209211
def _create_lstm_inputs(self, net):

0 commit comments

Comments
 (0)