def testModelShapesWithSqueeze(self):
    """Test shapes after running some fake data through the model."""
    i3d_model = i3d.InceptionI3d(
        num_classes=_NUM_CLASSES, final_endpoint='Predictions')
    inp = tf.placeholder(tf.float32, [None, 64, _IMAGE_SIZE, _IMAGE_SIZE, 3])
    predictions, end_points = i3d_model(
        inp, is_training=True, dropout_keep_prob=0.5)

    init_op = tf.global_variables_initializer()
    with tf.Session() as sess:
      sess.run(init_op)
      sample_input = np.zeros((5, 64, _IMAGE_SIZE, _IMAGE_SIZE, 3))
      out_predictions, out_logits = sess.run(
          [predictions, end_points['Logits']], {inp: sample_input})
      self.assertEqual(out_predictions.shape, (5, _NUM_CLASSES))
      self.assertEqual(out_logits.shape, (5, _NUM_CLASSES))
Test shapes after running some fake data through the model.
i3d_test.py