def testInconsistentRankInputsForIW(self):
    """Test one of many possible errors in shape of inputs."""
    placeholders = {
        'log_rhos': tf.placeholder(dtype=tf.float32, shape=[None, None, 1]),
        'discounts': tf.placeholder(dtype=tf.float32, shape=[None, None, 1]),
        'rewards': tf.placeholder(dtype=tf.float32, shape=[None, None, 42]),
        'values': tf.placeholder(dtype=tf.float32, shape=[None, None, 42]),
        # Should be [None, 42].
        'bootstrap_value': tf.placeholder(dtype=tf.float32, shape=[None])
    }
    with self.assertRaisesRegexp(ValueError, 'must have rank 2'):
      vtrace_ops.vtrace_from_importance_weights(**placeholders)
Test one of many possible errors in shape of inputs.
trfl/vtrace_ops_test.py