Skip to content

Commit

Permalink
Add support for TF 1.0 in version control convolution.py
Browse files Browse the repository at this point in the history
The if-statement is to general, by including the complete version
number we assure that the correct key is loaded for TF 1.0 as well.
  • Loading branch information
indradenbakker committed Mar 24, 2017
1 parent 5b9c2b0 commit fe251da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vehicle-detection/darkflow/net/ops/convolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ def batchnorm(self, layer, inp):
'updates_collections' : None,
'is_training': layer.h['is_training']
})
v = tf.__version__.split('.')[1]
if int(v) < 12: key = 'initializers'
v = tf.__version__
if int(v) < 0.12: key = 'initializers'
else: key = 'param_initializers'
args.update({key : layer.w})
return slim.batch_norm(inp, **args)
Expand Down

0 comments on commit fe251da

Please sign in to comment.