Commit 5274ec8b authored by Adrian Boguszewski's avatar Adrian Boguszewski Committed by Yukun Zhu
Browse files

Fixed incorrect tensor and python3 compatibility (#6280)

* Fixed incorrect tensor

* Replaced xrange with range for python3 compatibility
parent 338088df
...@@ -132,8 +132,7 @@ def main(unused_argv): ...@@ -132,8 +132,7 @@ def main(unused_argv):
predictions = tf.cast(predictions[common.OUTPUT_TYPE], tf.float32) predictions = tf.cast(predictions[common.OUTPUT_TYPE], tf.float32)
# Crop the valid regions from the predictions. # Crop the valid regions from the predictions.
raw_predictions = tf.identity( raw_predictions = tf.identity(predictions, _RAW_OUTPUT_NAME)
predictions[common.OUTPUT_TYPE], _RAW_OUTPUT_NAME)
semantic_predictions = tf.slice( semantic_predictions = tf.slice(
raw_predictions, raw_predictions,
[0, 0, 0], [0, 0, 0],
......
...@@ -357,7 +357,7 @@ def _train_deeplab_model(iterator, num_of_classes, ignore_label): ...@@ -357,7 +357,7 @@ def _train_deeplab_model(iterator, num_of_classes, ignore_label):
tower_grads = [] tower_grads = []
tower_summaries = None tower_summaries = None
for i in xrange(FLAGS.num_clones): for i in range(FLAGS.num_clones):
with tf.device('/gpu:%d' % i): with tf.device('/gpu:%d' % i):
with tf.name_scope('clone_%d' % i) as scope: with tf.name_scope('clone_%d' % i) as scope:
loss = _tower_loss( loss = _tower_loss(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment