Skip to content
This repository has been archived by the owner on Nov 25, 2021. It is now read-only.

Two small changes to add support for TF 1.0 for YOLO (vehicle-detection/darkflow/) #33

Merged
merged 3 commits into from
Nov 19, 2018

Conversation

indradenbakker
Copy link
Contributor

Added support for TF 1.0 for YOLO detector for vehicle detection. By making 2 small changes in convolution.py and simple.py we ensure the code runs for all versions of TF:

  • input order for tf.concat changed in TF 1.0
  • if-statement in convolution.py was generic and didn't support >= 1.0

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.
In TF 1.0 the order for the variables in tf.concat are changed. By
explicitly naming the inputs we ensure that the code works for all
versions.
Optimised code for TF 1.0.1 as well. We only check major and minor
version number now. Everything < 0.11 uses different key name
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'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

int(v_ma) < 1 & int(v_mi) < 12 , how can at a time value be less then 1 and 12, then second condition has no meaning.

is the actual condition like int(v_ma) > 1 & int(v_mi) < 12

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kiranvdhotre Please pay attention to the variable names. One is for the version's major value and the other for the minor value, v_ma and v_mi respectively.

@mvirgo mvirgo merged commit a8f1a44 into udacity:master Nov 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants