Fix a bug in strides to layout conversion.
Fix a bug in strides to layout conversion.

Do not rely on implicit bool conversion of iterator.

PiperOrigin-RevId: 330584856
Change-Id: I42e2128542e11c6704e24a9319358462c780490f

cxxgtxy/tensorflow,gautam1858/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-pywrap_tf_optimizer,petewarden/tensorflow,aam-at/tensorflow,petewarden/tensorflow,yongtang/tensorflow,paolodedios/tensorflow,karllessard/tensorflow,paolodedios/tensorflow,sarvex/tensorflow,cxxgtxy/tensorflow,yongtang/tensorflow,cxxgtxy/tensorflow,davidzchen/tensorflow,sarvex/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,gautam1858/tensorflow,davidzchen/tensorflow,paolodedios/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-pywrap_tf_optimizer,davidzchen/tensorflow,petewarden/tensorflow,yongtang/tensorflow,aam-at/tensorflow,annarev/tensorflow,paolodedios/tensorflow,aam-at/tensorflow,sarvex/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,cxxgtxy/tensorflow,karllessard/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_saved_model,davidzchen/tensorflow,Intel-tensorflow/tensorflow,Intel-Corporation/tensorflow,Intel-tensorflow/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-tensorflow/tensorflow,davidzchen/tensorflow,frreiss/tensorflow-fred,davidzchen/tensorflow,aam-at/tensorflow,tensorflow/tensorflow,Intel-Corporation/tensorflow,davidzchen/tensorflow,aam-at/tensorflow,freedomtan/tensorflow,karllessard/tensorflow,frreiss/tensorflow-fred,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,aam-at/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,karllessard/tensorflow,tensorflow/tensorflow,Intel-tensorflow/tensorflow,petewarden/tensorflow,Intel-tensorflow/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,annarev/tensorflow,tensorflow/tensorflow-pywrap_saved_model,annarev/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,sarvex/tensorflow,cxxgtxy/tensorflow,gautam1858/tensorflow,yongtang/tensorflow,yongtang/tensorflow,frreiss/tensorflow-fred,annarev/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow,petewarden/tensorflow,gautam1858/tensorflow,paolodedios/tensorflow,karllessard/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-pywrap_tf_optimizer,annarev/tensorflow,gautam1858/tensorflow,sarvex/tensorflow,tensorflow/tensorflow-pywrap_saved_model,aam-at/tensorflow,freedomtan/tensorflow,paolodedios/tensorflow,aam-at/tensorflow,Intel-tensorflow/tensorflow,freedomtan/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,gautam1858/tensorflow,frreiss/tensorflow-fred,petewarden/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow,gautam1858/tensorflow,cxxgtxy/tensorflow,frreiss/tensorflow-fred,davidzchen/tensorflow,freedomtan/tensorflow,Intel-tensorflow/tensorflow,gautam1858/tensorflow,aam-at/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-tensorflow/tensorflow,tensorflow/tensorflow,yongtang/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow,Intel-tensorflow/tensorflow,frreiss/tensorflow-fred,karllessard/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_saved_model,gautam1858/tensorflow,frreiss/tensorflow-fred,karllessard/tensorflow,karllessard/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_saved_model,frreiss/tensorflow-fred,tensorflow/tensorflow-experimental_link_static_libraries_once,annarev/tensorflow,Intel-tensorflow/tensorflow,Intel-Corporation/tensorflow,sarvex/tensorflow,freedomtan/tensorflow,annarev/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,aam-at/tensorflow,petewarden/tensorflow,petewarden/tensorflow,petewarden/tensorflow,frreiss/tensorflow-fred,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,davidzchen/tensorflow,gautam1858/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,sarvex/tensorflow,freedomtan/tensorflow,petewarden/tensorflow,gautam1858/tensorflow,Intel-Corporation/tensorflow,Intel-Corporation/tensorflow,freedomtan/tensorflow,davidzchen/tensorflow,petewarden/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,annarev/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow,annarev/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-experimental_link_static_libraries_once,sarvex/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gautam1858/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_saved_model,paolodedios/tensorflow,freedomtan/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,annarev/tensorflow,tensorflow/tensorflow-pywrap_saved_model,freedomtan/tensorflow,annarev/tensorflow,Intel-Corporation/tensorflow,aam-at/tensorflow,aam-at/tensorflow,petewarden/tensorflow