title: What is the outer inference context (shape_refiner.cc) in Tensorflow 2?
body: <p>This is the code from <code>Tensorflow's</code> github pages for <a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/common_runtime/shape_refiner.cc" rel="nofollow noreferrer">shape_refiner.cc</a>:</p>
  <pre><code>// TODO(b/134547156): TEMPORARY WORKAROUND. If input shape handle is not set
  // in outer context, set _Arg node output shape to unknown.
  if (outer_context-&gt;input(index).SameHandle(ShapeHandle())) {
    LOG(WARNING) &lt;&lt; &quot;Function instantiation has undefined input shape at &quot;
                 &lt;&lt; &quot;index: &quot; &lt;&lt; index &lt;&lt; &quot; in the outer inference context.&quot;;
    node_context-&gt;set_output(0, node_context-&gt;UnknownShape());
  } else {
    node_context-&gt;set_output(0, outer_context-&gt;input(index));
  }
  
  auto* resource = outer_context-&gt;input_handle_shapes_and_types(index);
  if (resource) {
    node_context-&gt;set_output_handle_shapes_and_types(0, *resource);
  }
  </code></pre>
  <p>I keep getting the warning set in the above code and it means nothing to me. Should I change my code or is this harmless to my training process? This question links to my other question: <a href="https://stackoverflow.com/questions/59039788/how-to-combine-a-pre-trained-keraslayer-from-tensorflow-v-2-hub-and-tfrecords">How to combine a pre-trained KerasLayer from TensorFlow (v. 2) Hub and tfrecords?</a></p>