title: Tensor shape seems to disappear when indexing result of tf.shape(tensor)
body: <p>When I try to index the result of <code>tf.shape(tensor)</code> where <code>tensor</code> is some tensor, the result seems to turn into <code>None</code> unexpectedly. For example, I ran this code:</p>
  <pre class="lang-py prettyprint-override"><code>&gt;&gt;&gt; from ray.rllib.models.utils import try_import_tf
  &gt;&gt;&gt; tf1, tf, tfv = try_import_tf() 
  &gt;&gt;&gt; tf.compat.v1.enable_eager_execution()  
  &gt;&gt;&gt; inp = tf.keras.layers.Input(shape=([19, 33, 1]), name='input')
  &gt;&gt;&gt; tf.shape(inp)
  &lt;KerasTensor: shape=(4,) dtype=int32 inferred_value=[None, 19, 33, 1] (created by layer 'tf.compat.v1.shape')&gt;
  </code></pre>
  <p>And the results are as expected. However, when I try to run the following code next:</p>
  <pre class="lang-py prettyprint-override"><code>&gt;&gt;&gt; tf.shape(inp)[0]
  &lt;KerasTensor: shape=() dtype=int32 inferred_value=[None] (created by layer 'tf.__operators__.getitem')&gt;
  &gt;&gt;&gt; tf.shape(inp)[1]
  &lt;KerasTensor: shape=() dtype=int32 inferred_value=[None] (created by layer 'tf.__operators__.getitem_1')&gt;
  &gt;&gt;&gt; tf.shape(inp)[2]
  &lt;KerasTensor: shape=() dtype=int32 inferred_value=[None] (created by layer 'tf.__operators__.getitem_2')&gt;
  &gt;&gt;&gt; tf.shape(inp)[3]
  &lt;KerasTensor: shape=() dtype=int32 inferred_value=[None] (created by layer 'tf.__operators__.getitem_3')&gt;
  </code></pre>
  <p>The inferred values are all <code>None</code>. What's going on here? Is this expected behaviour?</p>