Fix Tensor equality bug in _run_internal_graph.
Fix Tensor equality bug in _run_internal_graph.

We can no longer simply say `t in collection` when `t` is a Tensor. We need to look up by id explicitly.

PiperOrigin-RevId: 263598715

Intel-tensorflow/tensorflow,davidzchen/tensorflow,arborh/tensorflow,Intel-Corporation/tensorflow,davidzchen/tensorflow,arborh/tensorflow,sarvex/tensorflow,gunan/tensorflow,yongtang/tensorflow,xzturn/tensorflow,sarvex/tensorflow,sarvex/tensorflow,karllessard/tensorflow,sarvex/tensorflow,renyi533/tensorflow,arborh/tensorflow,tensorflow/tensorflow-pywrap_saved_model,renyi533/tensorflow,aam-at/tensorflow,freedomtan/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,petewarden/tensorflow,aam-at/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,petewarden/tensorflow,aldian/tensorflow,karllessard/tensorflow,chemelnucfin/tensorflow,renyi533/tensorflow,adit-chandra/tensorflow,Intel-tensorflow/tensorflow,aldian/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_saved_model,aam-at/tensorflow,frreiss/tensorflow-fred,petewarden/tensorflow,adit-chandra/tensorflow,petewarden/tensorflow,freedomtan/tensorflow,jhseu/tensorflow,gautam1858/tensorflow,renyi533/tensorflow,gunan/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,frreiss/tensorflow-fred,xzturn/tensorflow,tensorflow/tensorflow,cxxgtxy/tensorflow,annarev/tensorflow,arborh/tensorflow,adit-chandra/tensorflow,karllessard/tensorflow,paolodedios/tensorflow,davidzchen/tensorflow,aam-at/tensorflow,davidzchen/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,chemelnucfin/tensorflow,chemelnucfin/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_saved_model,gautam1858/tensorflow,aldian/tensorflow,tensorflow/tensorflow-pywrap_saved_model,yongtang/tensorflow,yongtang/tensorflow,DavidNorman/tensorflow,paolodedios/tensorflow,renyi533/tensorflow,Intel-Corporation/tensorflow,renyi533/tensorflow,jhseu/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,gunan/tensorflow,annarev/tensorflow,tensorflow/tensorflow-pywrap_saved_model,karllessard/tensorflow,sarvex/tensorflow,chemelnucfin/tensorflow,frreiss/tensorflow-fred,arborh/tensorflow,cxxgtxy/tensorflow,arborh/tensorflow,jhseu/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,chemelnucfin/tensorflow,tensorflow/tensorflow,paolodedios/tensorflow,gunan/tensorflow,adit-chandra/tensorflow,ppwwyyxx/tensorflow,renyi533/tensorflow,paolodedios/tensorflow,yongtang/tensorflow,arborh/tensorflow,ppwwyyxx/tensorflow,karllessard/tensorflow,tensorflow/tensorflow,yongtang/tensorflow,gautam1858/tensorflow,petewarden/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_saved_model,ppwwyyxx/tensorflow,adit-chandra/tensorflow,freedomtan/tensorflow,aldian/tensorflow,aam-at/tensorflow,yongtang/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gunan/tensorflow,aam-at/tensorflow,aldian/tensorflow,frreiss/tensorflow-fred,gunan/tensorflow,Intel-Corporation/tensorflow,chemelnucfin/tensorflow,ppwwyyxx/tensorflow,arborh/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,freedomtan/tensorflow,renyi533/tensorflow,aldian/tensorflow,aam-at/tensorflow,karllessard/tensorflow,paolodedios/tensorflow,frreiss/tensorflow-fred,freedomtan/tensorflow,DavidNorman/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-tensorflow/tensorflow,gautam1858/tensorflow,aam-at/tensorflow,Intel-tensorflow/tensorflow,ppwwyyxx/tensorflow,gunan/tensorflow,frreiss/tensorflow-fred,chemelnucfin/tensorflow,davidzchen/tensorflow,annarev/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_saved_model,frreiss/tensorflow-fred,petewarden/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,freedomtan/tensorflow,gautam1858/tensorflow,DavidNorman/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,petewarden/tensorflow,paolodedios/tensorflow,xzturn/tensorflow,sarvex/tensorflow,adit-chandra/tensorflow,adit-chandra/tensorflow,davidzchen/tensorflow,davidzchen/tensorflow,gunan/tensorflow,tensorflow/tensorflow-pywrap_saved_model,DavidNorman/tensorflow,freedomtan/tensorflow,davidzchen/tensorflow,ppwwyyxx/tensorflow,Intel-tensorflow/tensorflow,chemelnucfin/tensorflow,annarev/tensorflow,Intel-tensorflow/tensorflow,jhseu/tensorflow,xzturn/tensorflow,freedomtan/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow,xzturn/tensorflow,yongtang/tensorflow,xzturn/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,jhseu/tensorflow,aam-at/tensorflow,tensorflow/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-tensorflow/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_saved_model,frreiss/tensorflow-fred,DavidNorman/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,davidzchen/tensorflow,aam-at/tensorflow,davidzchen/tensorflow,DavidNorman/tensorflow,xzturn/tensorflow,adit-chandra/tensorflow,adit-chandra/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,arborh/tensorflow,Intel-Corporation/tensorflow,adit-chandra/tensorflow,DavidNorman/tensorflow,jhseu/tensorflow,cxxgtxy/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow,freedomtan/tensorflow,aldian/tensorflow,DavidNorman/tensorflow,yongtang/tensorflow,chemelnucfin/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,gautam1858/tensorflow,ppwwyyxx/tensorflow,ppwwyyxx/tensorflow,ppwwyyxx/tensorflow,frreiss/tensorflow-fred,jhseu/tensorflow,freedomtan/tensorflow,frreiss/tensorflow-fred,gunan/tensorflow,adit-chandra/tensorflow,xzturn/tensorflow,yongtang/tensorflow,aam-at/tensorflow,frreiss/tensorflow-fred,gautam1858/tensorflow,karllessard/tensorflow,DavidNorman/tensorflow,annarev/tensorflow,DavidNorman/tensorflow,xzturn/tensorflow,tensorflow/tensorflow,cxxgtxy/tensorflow,renyi533/tensorflow,yongtang/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,xzturn/tensorflow,petewarden/tensorflow,ppwwyyxx/tensorflow,tensorflow/tensorflow,freedomtan/tensorflow,paolodedios/tensorflow,cxxgtxy/tensorflow,Intel-tensorflow/tensorflow,renyi533/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-experimental_link_static_libraries_once,paolodedios/tensorflow,jhseu/tensorflow,jhseu/tensorflow,Intel-tensorflow/tensorflow,renyi533/tensorflow,cxxgtxy/tensorflow,xzturn/tensorflow,Intel-tensorflow/tensorflow,aldian/tensorflow,annarev/tensorflow,sarvex/tensorflow,DavidNorman/tensorflow,gunan/tensorflow,arborh/tensorflow,freedomtan/tensorflow,karllessard/tensorflow,renyi533/tensorflow,gautam1858/tensorflow,DavidNorman/tensorflow,gunan/tensorflow,ppwwyyxx/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,cxxgtxy/tensorflow,chemelnucfin/tensorflow,ppwwyyxx/tensorflow,arborh/tensorflow,jhseu/tensorflow,chemelnucfin/tensorflow,annarev/tensorflow,chemelnucfin/tensorflow,tensorflow/tensorflow-pywrap_saved_model,Intel-Corporation/tensorflow,jhseu/tensorflow,annarev/tensorflow,xzturn/tensorflow,gunan/tensorflow,sarvex/tensorflow,annarev/tensorflow,davidzchen/tensorflow,Intel-tensorflow/tensorflow,annarev/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,arborh/tensorflow,jhseu/tensorflow,aam-at/tensorflow,paolodedios/tensorflow,davidzchen/tensorflow,Intel-Corporation/tensorflow,annarev/tensorflow,karllessard/tensorflow,frreiss/tensorflow-fred