|
18 | 18 | from __future__ import division |
19 | 19 | from __future__ import print_function |
20 | 20 |
|
21 | | -import numpy as np |
22 | | -import tensorflow as tf |
23 | | - |
24 | 21 | from nets import resnet_utils |
25 | 22 | from nets import resnet_v1 |
| 23 | +import numpy as np |
| 24 | +from six.moves import range |
| 25 | +from six.moves import zip |
| 26 | +import tensorflow as tf |
26 | 27 |
|
27 | 28 | slim = tf.contrib.slim |
28 | 29 |
|
@@ -185,7 +186,7 @@ def testEndPointsV1(self): |
185 | 186 | 'tiny/block2/unit_2/bottleneck_v1/conv1', |
186 | 187 | 'tiny/block2/unit_2/bottleneck_v1/conv2', |
187 | 188 | 'tiny/block2/unit_2/bottleneck_v1/conv3'] |
188 | | - self.assertItemsEqual(expected, end_points.keys()) |
| 189 | + self.assertItemsEqual(expected, list(end_points.keys())) |
189 | 190 |
|
190 | 191 | def _stack_blocks_nondense(self, net, blocks): |
191 | 192 | """A simplified ResNet Block stacker without output stride control.""" |
@@ -392,7 +393,7 @@ def testEndpointNames(self): |
392 | 393 | expected.append('resnet/block%d' % block) |
393 | 394 | expected.extend(['global_pool', 'resnet/logits', 'resnet/spatial_squeeze', |
394 | 395 | 'predictions']) |
395 | | - self.assertItemsEqual(end_points.keys(), expected) |
| 396 | + self.assertItemsEqual(list(end_points.keys()), expected) |
396 | 397 |
|
397 | 398 | def testClassificationShapes(self): |
398 | 399 | global_pool = True |
|
0 commit comments