Python nets.inception.inception_resnet_v2() Examples
The following are 30
code examples of nets.inception.inception_resnet_v2().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
nets.inception
, or try the search function
.
Example #1
Source File: inception_resnet_v2_test.py From CVTron with Apache License 2.0 | 6 votes |
def testTrainEvalWithReuse(self): train_batch_size = 5 eval_batch_size = 2 height, width = 150, 150 num_classes = 1000 with self.test_session() as sess: train_inputs = tf.random_uniform((train_batch_size, height, width, 3)) inception.inception_resnet_v2(train_inputs, num_classes) eval_inputs = tf.random_uniform((eval_batch_size, height, width, 3)) logits, _ = inception.inception_resnet_v2(eval_inputs, num_classes, is_training=False, reuse=True) predictions = tf.argmax(logits, 1) sess.run(tf.global_variables_initializer()) output = sess.run(predictions) self.assertEquals(output.shape, (eval_batch_size,))
Example #2
Source File: inception_resnet_v2_test.py From DOTA_models with Apache License 2.0 | 6 votes |
def testBuildEndPoints(self): batch_size = 5 height, width = 299, 299 num_classes = 1000 with self.test_session(): inputs = tf.random_uniform((batch_size, height, width, 3)) _, end_points = inception.inception_resnet_v2(inputs, num_classes) self.assertTrue('Logits' in end_points) logits = end_points['Logits'] self.assertListEqual(logits.get_shape().as_list(), [batch_size, num_classes]) self.assertTrue('AuxLogits' in end_points) aux_logits = end_points['AuxLogits'] self.assertListEqual(aux_logits.get_shape().as_list(), [batch_size, num_classes]) pre_pool = end_points['Conv2d_7b_1x1'] self.assertListEqual(pre_pool.get_shape().as_list(), [batch_size, 8, 8, 1536])
Example #3
Source File: inception_resnet_v2_test.py From DOTA_models with Apache License 2.0 | 6 votes |
def testBuildLogits(self): batch_size = 5 height, width = 299, 299 num_classes = 1000 with self.test_session(): inputs = tf.random_uniform((batch_size, height, width, 3)) logits, endpoints = inception.inception_resnet_v2(inputs, num_classes) self.assertTrue('AuxLogits' in endpoints) auxlogits = endpoints['AuxLogits'] self.assertTrue( auxlogits.op.name.startswith('InceptionResnetV2/AuxLogits')) self.assertListEqual(auxlogits.get_shape().as_list(), [batch_size, num_classes]) self.assertTrue(logits.op.name.startswith('InceptionResnetV2/Logits')) self.assertListEqual(logits.get_shape().as_list(), [batch_size, num_classes])
Example #4
Source File: inception_resnet_v2_test.py From ctw-baseline with MIT License | 6 votes |
def testBuildLogits(self): batch_size = 5 height, width = 299, 299 num_classes = 1000 with self.test_session(): inputs = tf.random_uniform((batch_size, height, width, 3)) logits, endpoints = inception.inception_resnet_v2(inputs, num_classes) self.assertTrue('AuxLogits' in endpoints) auxlogits = endpoints['AuxLogits'] self.assertTrue( auxlogits.op.name.startswith('InceptionResnetV2/AuxLogits')) self.assertListEqual(auxlogits.get_shape().as_list(), [batch_size, num_classes]) self.assertTrue(logits.op.name.startswith('InceptionResnetV2/Logits')) self.assertListEqual(logits.get_shape().as_list(), [batch_size, num_classes])
Example #5
Source File: inception_resnet_v2_test.py From ctw-baseline with MIT License | 6 votes |
def testBuildEndPoints(self): batch_size = 5 height, width = 299, 299 num_classes = 1000 with self.test_session(): inputs = tf.random_uniform((batch_size, height, width, 3)) _, end_points = inception.inception_resnet_v2(inputs, num_classes) self.assertTrue('Logits' in end_points) logits = end_points['Logits'] self.assertListEqual(logits.get_shape().as_list(), [batch_size, num_classes]) self.assertTrue('AuxLogits' in end_points) aux_logits = end_points['AuxLogits'] self.assertListEqual(aux_logits.get_shape().as_list(), [batch_size, num_classes]) pre_pool = end_points['Conv2d_7b_1x1'] self.assertListEqual(pre_pool.get_shape().as_list(), [batch_size, 8, 8, 1536])
Example #6
Source File: inception_resnet_v2_test.py From DeepLab_v3 with MIT License | 6 votes |
def testBuildLogits(self): batch_size = 5 height, width = 299, 299 num_classes = 1000 with self.test_session(): inputs = tf.random_uniform((batch_size, height, width, 3)) logits, endpoints = inception.inception_resnet_v2(inputs, num_classes) self.assertTrue('AuxLogits' in endpoints) auxlogits = endpoints['AuxLogits'] self.assertTrue( auxlogits.op.name.startswith('InceptionResnetV2/AuxLogits')) self.assertListEqual(auxlogits.get_shape().as_list(), [batch_size, num_classes]) self.assertTrue(logits.op.name.startswith('InceptionResnetV2/Logits')) self.assertListEqual(logits.get_shape().as_list(), [batch_size, num_classes])
Example #7
Source File: inception_resnet_v2_test.py From edafa with MIT License | 6 votes |
def testGlobalPoolUnknownImageShape(self): batch_size = 1 height, width = 330, 400 num_classes = 1000 with self.test_session() as sess: inputs = tf.placeholder(tf.float32, (batch_size, None, None, 3)) logits, end_points = inception.inception_resnet_v2( inputs, num_classes, create_aux_logits=False) self.assertTrue(logits.op.name.startswith('InceptionResnetV2/Logits')) self.assertListEqual(logits.get_shape().as_list(), [batch_size, num_classes]) pre_pool = end_points['Conv2d_7b_1x1'] images = tf.random_uniform((batch_size, height, width, 3)) sess.run(tf.global_variables_initializer()) logits_out, pre_pool_out = sess.run([logits, pre_pool], {inputs: images.eval()}) self.assertTupleEqual(logits_out.shape, (batch_size, num_classes)) self.assertTupleEqual(pre_pool_out.shape, (batch_size, 8, 11, 1536))
Example #8
Source File: inception_resnet_v2_test.py From DeepLab_v3 with MIT License | 6 votes |
def testGlobalPoolUnknownImageShape(self): batch_size = 1 height, width = 330, 400 num_classes = 1000 with self.test_session() as sess: inputs = tf.placeholder(tf.float32, (batch_size, None, None, 3)) logits, end_points = inception.inception_resnet_v2( inputs, num_classes, create_aux_logits=False) self.assertTrue(logits.op.name.startswith('InceptionResnetV2/Logits')) self.assertListEqual(logits.get_shape().as_list(), [batch_size, num_classes]) pre_pool = end_points['Conv2d_7b_1x1'] images = tf.random_uniform((batch_size, height, width, 3)) sess.run(tf.global_variables_initializer()) logits_out, pre_pool_out = sess.run([logits, pre_pool], {inputs: images.eval()}) self.assertTupleEqual(logits_out.shape, (batch_size, num_classes)) self.assertTupleEqual(pre_pool_out.shape, (batch_size, 8, 11, 1536))
Example #9
Source File: inception_resnet_v2_test.py From cv-tricks.com with MIT License | 6 votes |
def testBuildEndPoints(self): batch_size = 5 height, width = 299, 299 num_classes = 1000 with self.test_session(): inputs = tf.random_uniform((batch_size, height, width, 3)) _, end_points = inception.inception_resnet_v2(inputs, num_classes) self.assertTrue('Logits' in end_points) logits = end_points['Logits'] self.assertListEqual(logits.get_shape().as_list(), [batch_size, num_classes]) self.assertTrue('AuxLogits' in end_points) aux_logits = end_points['AuxLogits'] self.assertListEqual(aux_logits.get_shape().as_list(), [batch_size, num_classes]) pre_pool = end_points['PrePool'] self.assertListEqual(pre_pool.get_shape().as_list(), [batch_size, 8, 8, 1536])
Example #10
Source File: inception_resnet_v2_test.py From DOTA_models with Apache License 2.0 | 6 votes |
def testTrainEvalWithReuse(self): train_batch_size = 5 eval_batch_size = 2 height, width = 150, 150 num_classes = 1000 with self.test_session() as sess: train_inputs = tf.random_uniform((train_batch_size, height, width, 3)) inception.inception_resnet_v2(train_inputs, num_classes) eval_inputs = tf.random_uniform((eval_batch_size, height, width, 3)) logits, _ = inception.inception_resnet_v2(eval_inputs, num_classes, is_training=False, reuse=True) predictions = tf.argmax(logits, 1) sess.run(tf.global_variables_initializer()) output = sess.run(predictions) self.assertEquals(output.shape, (eval_batch_size,))
Example #11
Source File: inception_resnet_v2_test.py From DeepLab_v3 with MIT License | 6 votes |
def testBuildEndPoints(self): batch_size = 5 height, width = 299, 299 num_classes = 1000 with self.test_session(): inputs = tf.random_uniform((batch_size, height, width, 3)) _, end_points = inception.inception_resnet_v2(inputs, num_classes) self.assertTrue('Logits' in end_points) logits = end_points['Logits'] self.assertListEqual(logits.get_shape().as_list(), [batch_size, num_classes]) self.assertTrue('AuxLogits' in end_points) aux_logits = end_points['AuxLogits'] self.assertListEqual(aux_logits.get_shape().as_list(), [batch_size, num_classes]) pre_pool = end_points['Conv2d_7b_1x1'] self.assertListEqual(pre_pool.get_shape().as_list(), [batch_size, 8, 8, 1536])
Example #12
Source File: inception_resnet_v2_test.py From edafa with MIT License | 6 votes |
def testBuildEndPoints(self): batch_size = 5 height, width = 299, 299 num_classes = 1000 with self.test_session(): inputs = tf.random_uniform((batch_size, height, width, 3)) _, end_points = inception.inception_resnet_v2(inputs, num_classes) self.assertTrue('Logits' in end_points) logits = end_points['Logits'] self.assertListEqual(logits.get_shape().as_list(), [batch_size, num_classes]) self.assertTrue('AuxLogits' in end_points) aux_logits = end_points['AuxLogits'] self.assertListEqual(aux_logits.get_shape().as_list(), [batch_size, num_classes]) pre_pool = end_points['Conv2d_7b_1x1'] self.assertListEqual(pre_pool.get_shape().as_list(), [batch_size, 8, 8, 1536])
Example #13
Source File: inception_resnet_v2_test.py From ctw-baseline with MIT License | 6 votes |
def testTrainEvalWithReuse(self): train_batch_size = 5 eval_batch_size = 2 height, width = 150, 150 num_classes = 1000 with self.test_session() as sess: train_inputs = tf.random_uniform((train_batch_size, height, width, 3)) inception.inception_resnet_v2(train_inputs, num_classes) eval_inputs = tf.random_uniform((eval_batch_size, height, width, 3)) logits, _ = inception.inception_resnet_v2(eval_inputs, num_classes, is_training=False, reuse=True) predictions = tf.argmax(logits, 1) sess.run(tf.global_variables_initializer()) output = sess.run(predictions) self.assertEquals(output.shape, (eval_batch_size,))
Example #14
Source File: inception_resnet_v2_test.py From R2CNN_Faster-RCNN_Tensorflow with MIT License | 6 votes |
def testBuildLogits(self): batch_size = 5 height, width = 299, 299 num_classes = 1000 with self.test_session(): inputs = tf.random_uniform((batch_size, height, width, 3)) logits, endpoints = inception.inception_resnet_v2(inputs, num_classes) self.assertTrue('AuxLogits' in endpoints) auxlogits = endpoints['AuxLogits'] self.assertTrue( auxlogits.op.name.startswith('InceptionResnetV2/AuxLogits')) self.assertListEqual(auxlogits.get_shape().as_list(), [batch_size, num_classes]) self.assertTrue(logits.op.name.startswith('InceptionResnetV2/Logits')) self.assertListEqual(logits.get_shape().as_list(), [batch_size, num_classes])
Example #15
Source File: inception_resnet_v2_test.py From R2CNN_Faster-RCNN_Tensorflow with MIT License | 6 votes |
def testBuildEndPoints(self): batch_size = 5 height, width = 299, 299 num_classes = 1000 with self.test_session(): inputs = tf.random_uniform((batch_size, height, width, 3)) _, end_points = inception.inception_resnet_v2(inputs, num_classes) self.assertTrue('Logits' in end_points) logits = end_points['Logits'] self.assertListEqual(logits.get_shape().as_list(), [batch_size, num_classes]) self.assertTrue('AuxLogits' in end_points) aux_logits = end_points['AuxLogits'] self.assertListEqual(aux_logits.get_shape().as_list(), [batch_size, num_classes]) pre_pool = end_points['Conv2d_7b_1x1'] self.assertListEqual(pre_pool.get_shape().as_list(), [batch_size, 8, 8, 1536])
Example #16
Source File: inception_resnet_v2_test.py From edafa with MIT License | 6 votes |
def testBuildLogits(self): batch_size = 5 height, width = 299, 299 num_classes = 1000 with self.test_session(): inputs = tf.random_uniform((batch_size, height, width, 3)) logits, endpoints = inception.inception_resnet_v2(inputs, num_classes) self.assertTrue('AuxLogits' in endpoints) auxlogits = endpoints['AuxLogits'] self.assertTrue( auxlogits.op.name.startswith('InceptionResnetV2/AuxLogits')) self.assertListEqual(auxlogits.get_shape().as_list(), [batch_size, num_classes]) self.assertTrue(logits.op.name.startswith('InceptionResnetV2/Logits')) self.assertListEqual(logits.get_shape().as_list(), [batch_size, num_classes])
Example #17
Source File: inception_resnet_v2_test.py From R2CNN_Faster-RCNN_Tensorflow with MIT License | 6 votes |
def testTrainEvalWithReuse(self): train_batch_size = 5 eval_batch_size = 2 height, width = 150, 150 num_classes = 1000 with self.test_session() as sess: train_inputs = tf.random_uniform((train_batch_size, height, width, 3)) inception.inception_resnet_v2(train_inputs, num_classes) eval_inputs = tf.random_uniform((eval_batch_size, height, width, 3)) logits, _ = inception.inception_resnet_v2(eval_inputs, num_classes, is_training=False, reuse=True) predictions = tf.argmax(logits, 1) sess.run(tf.global_variables_initializer()) output = sess.run(predictions) self.assertEquals(output.shape, (eval_batch_size,))
Example #18
Source File: inception_resnet_v2_test.py From tf-pose with Apache License 2.0 | 6 votes |
def testBuildLogits(self): batch_size = 5 height, width = 299, 299 num_classes = 1000 with self.test_session(): inputs = tf.random_uniform((batch_size, height, width, 3)) logits, endpoints = inception.inception_resnet_v2(inputs, num_classes) self.assertTrue('AuxLogits' in endpoints) auxlogits = endpoints['AuxLogits'] self.assertTrue( auxlogits.op.name.startswith('InceptionResnetV2/AuxLogits')) self.assertListEqual(auxlogits.get_shape().as_list(), [batch_size, num_classes]) self.assertTrue(logits.op.name.startswith('InceptionResnetV2/Logits')) self.assertListEqual(logits.get_shape().as_list(), [batch_size, num_classes])
Example #19
Source File: inception_resnet_v2_test.py From CVTron with Apache License 2.0 | 6 votes |
def testGlobalPoolUnknownImageShape(self): batch_size = 1 height, width = 330, 400 num_classes = 1000 with self.test_session() as sess: inputs = tf.placeholder(tf.float32, (batch_size, None, None, 3)) logits, end_points = inception.inception_resnet_v2( inputs, num_classes, create_aux_logits=False) self.assertTrue(logits.op.name.startswith('InceptionResnetV2/Logits')) self.assertListEqual(logits.get_shape().as_list(), [batch_size, num_classes]) pre_pool = end_points['Conv2d_7b_1x1'] images = tf.random_uniform((batch_size, height, width, 3)) sess.run(tf.global_variables_initializer()) logits_out, pre_pool_out = sess.run([logits, pre_pool], {inputs: images.eval()}) self.assertTupleEqual(logits_out.shape, (batch_size, num_classes)) self.assertTupleEqual(pre_pool_out.shape, (batch_size, 8, 11, 1536))
Example #20
Source File: inception_resnet_v2_test.py From tf-pose with Apache License 2.0 | 6 votes |
def testBuildEndPoints(self): batch_size = 5 height, width = 299, 299 num_classes = 1000 with self.test_session(): inputs = tf.random_uniform((batch_size, height, width, 3)) _, end_points = inception.inception_resnet_v2(inputs, num_classes) self.assertTrue('Logits' in end_points) logits = end_points['Logits'] self.assertListEqual(logits.get_shape().as_list(), [batch_size, num_classes]) self.assertTrue('AuxLogits' in end_points) aux_logits = end_points['AuxLogits'] self.assertListEqual(aux_logits.get_shape().as_list(), [batch_size, num_classes]) pre_pool = end_points['Conv2d_7b_1x1'] self.assertListEqual(pre_pool.get_shape().as_list(), [batch_size, 8, 8, 1536])
Example #21
Source File: inception_resnet_v2_test.py From CVTron with Apache License 2.0 | 6 votes |
def testBuildEndPoints(self): batch_size = 5 height, width = 299, 299 num_classes = 1000 with self.test_session(): inputs = tf.random_uniform((batch_size, height, width, 3)) _, end_points = inception.inception_resnet_v2(inputs, num_classes) self.assertTrue('Logits' in end_points) logits = end_points['Logits'] self.assertListEqual(logits.get_shape().as_list(), [batch_size, num_classes]) self.assertTrue('AuxLogits' in end_points) aux_logits = end_points['AuxLogits'] self.assertListEqual(aux_logits.get_shape().as_list(), [batch_size, num_classes]) pre_pool = end_points['Conv2d_7b_1x1'] self.assertListEqual(pre_pool.get_shape().as_list(), [batch_size, 8, 8, 1536])
Example #22
Source File: inception_resnet_v2_test.py From tf-pose with Apache License 2.0 | 6 votes |
def testGlobalPoolUnknownImageShape(self): batch_size = 2 height, width = 400, 600 num_classes = 1000 with self.test_session() as sess: inputs = tf.placeholder(tf.float32, (batch_size, None, None, 3)) logits, end_points = inception.inception_resnet_v2( inputs, num_classes, create_aux_logits=False) self.assertTrue(logits.op.name.startswith('InceptionResnetV2/Logits')) self.assertListEqual(logits.get_shape().as_list(), [batch_size, num_classes]) pre_pool = end_points['Conv2d_7b_1x1'] images = tf.random_uniform((batch_size, height, width, 3)) sess.run(tf.global_variables_initializer()) logits_out, pre_pool_out = sess.run([logits, pre_pool], {inputs: images.eval()}) self.assertTupleEqual(logits_out.shape, (batch_size, num_classes)) self.assertTupleEqual(pre_pool_out.shape, (batch_size, 11, 17, 1536))
Example #23
Source File: inception_resnet_v2_test.py From tf-pose with Apache License 2.0 | 6 votes |
def testTrainEvalWithReuse(self): train_batch_size = 5 eval_batch_size = 2 height, width = 150, 150 num_classes = 1000 with self.test_session() as sess: train_inputs = tf.random_uniform((train_batch_size, height, width, 3)) inception.inception_resnet_v2(train_inputs, num_classes) eval_inputs = tf.random_uniform((eval_batch_size, height, width, 3)) logits, _ = inception.inception_resnet_v2(eval_inputs, num_classes, is_training=False, reuse=True) predictions = tf.argmax(logits, 1) sess.run(tf.global_variables_initializer()) output = sess.run(predictions) self.assertEquals(output.shape, (eval_batch_size,))
Example #24
Source File: inception_resnet_v2_test.py From R2CNN-Plus-Plus_Tensorflow with MIT License | 6 votes |
def testBuildLogits(self): batch_size = 5 height, width = 299, 299 num_classes = 1000 with self.test_session(): inputs = tf.random_uniform((batch_size, height, width, 3)) logits, endpoints = inception.inception_resnet_v2(inputs, num_classes) self.assertTrue('AuxLogits' in endpoints) auxlogits = endpoints['AuxLogits'] self.assertTrue( auxlogits.op.name.startswith('InceptionResnetV2/AuxLogits')) self.assertListEqual(auxlogits.get_shape().as_list(), [batch_size, num_classes]) self.assertTrue(logits.op.name.startswith('InceptionResnetV2/Logits')) self.assertListEqual(logits.get_shape().as_list(), [batch_size, num_classes])
Example #25
Source File: inception_resnet_v2_test.py From CVTron with Apache License 2.0 | 6 votes |
def testBuildLogits(self): batch_size = 5 height, width = 299, 299 num_classes = 1000 with self.test_session(): inputs = tf.random_uniform((batch_size, height, width, 3)) logits, endpoints = inception.inception_resnet_v2(inputs, num_classes) self.assertTrue('AuxLogits' in endpoints) auxlogits = endpoints['AuxLogits'] self.assertTrue( auxlogits.op.name.startswith('InceptionResnetV2/AuxLogits')) self.assertListEqual(auxlogits.get_shape().as_list(), [batch_size, num_classes]) self.assertTrue(logits.op.name.startswith('InceptionResnetV2/Logits')) self.assertListEqual(logits.get_shape().as_list(), [batch_size, num_classes])
Example #26
Source File: inception_resnet_v2_test.py From R2CNN-Plus-Plus_Tensorflow with MIT License | 6 votes |
def testBuildEndPoints(self): batch_size = 5 height, width = 299, 299 num_classes = 1000 with self.test_session(): inputs = tf.random_uniform((batch_size, height, width, 3)) _, end_points = inception.inception_resnet_v2(inputs, num_classes) self.assertTrue('Logits' in end_points) logits = end_points['Logits'] self.assertListEqual(logits.get_shape().as_list(), [batch_size, num_classes]) self.assertTrue('AuxLogits' in end_points) aux_logits = end_points['AuxLogits'] self.assertListEqual(aux_logits.get_shape().as_list(), [batch_size, num_classes]) pre_pool = end_points['Conv2d_7b_1x1'] self.assertListEqual(pre_pool.get_shape().as_list(), [batch_size, 8, 8, 1536])
Example #27
Source File: inception_resnet_v2_test.py From R3Det_Tensorflow with MIT License | 6 votes |
def testTrainEvalWithReuse(self): train_batch_size = 5 eval_batch_size = 2 height, width = 150, 150 num_classes = 1000 with self.test_session() as sess: train_inputs = tf.random_uniform((train_batch_size, height, width, 3)) inception.inception_resnet_v2(train_inputs, num_classes) eval_inputs = tf.random_uniform((eval_batch_size, height, width, 3)) logits, _ = inception.inception_resnet_v2(eval_inputs, num_classes, is_training=False, reuse=True) predictions = tf.argmax(logits, 1) sess.run(tf.global_variables_initializer()) output = sess.run(predictions) self.assertEquals(output.shape, (eval_batch_size,))
Example #28
Source File: inception_resnet_v2_test.py From R2CNN-Plus-Plus_Tensorflow with MIT License | 6 votes |
def testTrainEvalWithReuse(self): train_batch_size = 5 eval_batch_size = 2 height, width = 150, 150 num_classes = 1000 with self.test_session() as sess: train_inputs = tf.random_uniform((train_batch_size, height, width, 3)) inception.inception_resnet_v2(train_inputs, num_classes) eval_inputs = tf.random_uniform((eval_batch_size, height, width, 3)) logits, _ = inception.inception_resnet_v2(eval_inputs, num_classes, is_training=False, reuse=True) predictions = tf.argmax(logits, 1) sess.run(tf.global_variables_initializer()) output = sess.run(predictions) self.assertEquals(output.shape, (eval_batch_size,))
Example #29
Source File: inception_resnet_v2_test.py From R3Det_Tensorflow with MIT License | 6 votes |
def testBuildLogits(self): batch_size = 5 height, width = 299, 299 num_classes = 1000 with self.test_session(): inputs = tf.random_uniform((batch_size, height, width, 3)) logits, endpoints = inception.inception_resnet_v2(inputs, num_classes) self.assertTrue('AuxLogits' in endpoints) auxlogits = endpoints['AuxLogits'] self.assertTrue( auxlogits.op.name.startswith('InceptionResnetV2/AuxLogits')) self.assertListEqual(auxlogits.get_shape().as_list(), [batch_size, num_classes]) self.assertTrue(logits.op.name.startswith('InceptionResnetV2/Logits')) self.assertListEqual(logits.get_shape().as_list(), [batch_size, num_classes])
Example #30
Source File: inception_resnet_v2_test.py From R3Det_Tensorflow with MIT License | 6 votes |
def testBuildEndPoints(self): batch_size = 5 height, width = 299, 299 num_classes = 1000 with self.test_session(): inputs = tf.random_uniform((batch_size, height, width, 3)) _, end_points = inception.inception_resnet_v2(inputs, num_classes) self.assertTrue('Logits' in end_points) logits = end_points['Logits'] self.assertListEqual(logits.get_shape().as_list(), [batch_size, num_classes]) self.assertTrue('AuxLogits' in end_points) aux_logits = end_points['AuxLogits'] self.assertListEqual(aux_logits.get_shape().as_list(), [batch_size, num_classes]) pre_pool = end_points['Conv2d_7b_1x1'] self.assertListEqual(pre_pool.get_shape().as_list(), [batch_size, 8, 8, 1536])