Skip to content

Commit

Permalink
Merge pull request udacity#33 from indradenbakker/master
Browse files Browse the repository at this point in the history
Two small changes to add support for TF 1.0 for YOLO (vehicle-detection/darkflow/)
  • Loading branch information
mvirgo authored Nov 19, 2018
2 parents d5c76c8 + e907abe commit a8f1a44
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 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,9 @@ 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_ma = tf.__version__.split('.')[0]
v_mi = tf.__version__.split('.')[1]
if int(v_ma) < 1 & int(v_mi) < 12: key = 'initializers'
else: key = 'param_initializers'
args.update({key : layer.w})
return slim.batch_norm(inp, **args)
Expand Down
2 changes: 1 addition & 1 deletion vehicle-detection/darkflow/net/ops/simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def forward(self):
assert this is not None, \
'Routing to non-existence {}'.format(r)
routes_out += [this.out]
self.out = tf.concat(3, routes_out)
self.out = tf.concat(axis=3, values=routes_out)

def speak(self):
msg = 'concat {}'
Expand Down

0 comments on commit a8f1a44

Please sign in to comment.