Make tf.size() with optimize=True encode 0 if any dimension is 0.
Make tf.size() with optimize=True encode 0 if any dimension is 0.

PiperOrigin-RevId: 186824964

jbedorf/tensorflow,tensorflow/tensorflow-pywrap_saved_model,gojira/tensorflow,ZhangXinNan/tensorflow,frreiss/tensorflow-fred,Bismarrck/tensorflow,DavidNorman/tensorflow,meteorcloudy/tensorflow,AnishShah/tensorflow,yongtang/tensorflow,aselle/tensorflow,Intel-tensorflow/tensorflow,snnn/tensorflow,asimshankar/tensorflow,eaplatanios/tensorflow,jalexvig/tensorflow,jhseu/tensorflow,DavidNorman/tensorflow,aldian/tensorflow,ppwwyyxx/tensorflow,benoitsteiner/tensorflow-xsmm,jalexvig/tensorflow,xzturn/tensorflow,dancingdan/tensorflow,frreiss/tensorflow-fred,Xeralux/tensorflow,caisq/tensorflow,sarvex/tensorflow,hfp/tensorflow-xsmm,yongtang/tensorflow,jhseu/tensorflow,gautam1858/tensorflow,cxxgtxy/tensorflow,aam-at/tensorflow,jart/tensorflow,xzturn/tensorflow,seanli9jan/tensorflow,gunan/tensorflow,kobejean/tensorflow,alsrgv/tensorflow,hfp/tensorflow-xsmm,annarev/tensorflow,Bismarrck/tensorflow,petewarden/tensorflow,ZhangXinNan/tensorflow,ageron/tensorflow,eaplatanios/tensorflow,dendisuhubdy/tensorflow,caisq/tensorflow,petewarden/tensorflow,girving/tensorflow,gautam1858/tensorflow,AnishShah/tensorflow,xodus7/tensorflow,ghchinoy/tensorflow,jalexvig/tensorflow,xodus7/tensorflow,gautam1858/tensorflow,ghchinoy/tensorflow,chemelnucfin/tensorflow,theflofly/tensorflow,dancingdan/tensorflow,jart/tensorflow,gojira/tensorflow,xodus7/tensorflow,arborh/tensorflow,ageron/tensorflow,jhseu/tensorflow,brchiu/tensorflow,asimshankar/tensorflow,Xeralux/tensorflow,xzturn/tensorflow,Xeralux/tensorflow,ZhangXinNan/tensorflow,dancingdan/tensorflow,frreiss/tensorflow-fred,ppwwyyxx/tensorflow,hfp/tensorflow-xsmm,frreiss/tensorflow-fred,DavidNorman/tensorflow,DavidNorman/tensorflow,davidzchen/tensorflow,nburn42/tensorflow,kevin-coder/tensorflow-fork,jbedorf/tensorflow,jbedorf/tensorflow,girving/tensorflow,caisq/tensorflow,drpngx/tensorflow,aselle/tensorflow,renyi533/tensorflow,jbedorf/tensorflow,ppwwyyxx/tensorflow,allenlavoie/tensorflow,jhseu/tensorflow,cxxgtxy/tensorflow,dongjoon-hyun/tensorflow,gautam1858/tensorflow,jart/tensorflow,snnn/tensorflow,nburn42/tensorflow,ZhangXinNan/tensorflow,eaplatanios/tensorflow,xodus7/tensorflow,snnn/tensorflow,tensorflow/tensorflow-pywrap_saved_model,davidzchen/tensorflow,jbedorf/tensorflow,chemelnucfin/tensorflow,manipopopo/tensorflow,chemelnucfin/tensorflow,lukeiwanski/tensorflow,hehongliang/tensorflow,hfp/tensorflow-xsmm,DavidNorman/tensorflow,dongjoon-hyun/tensorflow,aldian/tensorflow,apark263/tensorflow,Intel-tensorflow/tensorflow,dongjoon-hyun/tensorflow,davidzchen/tensorflow,jendap/tensorflow,jhseu/tensorflow,paolodedios/tensorflow,Xeralux/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_tf_optimizer,annarev/tensorflow,kobejean/tensorflow,apark263/tensorflow,kevin-coder/tensorflow-fork,meteorcloudy/tensorflow,Bismarrck/tensorflow,nburn42/tensorflow,davidzchen/tensorflow,yanchen036/tensorflow,dongjoon-hyun/tensorflow,dongjoon-hyun/tensorflow,renyi533/tensorflow,ppwwyyxx/tensorflow,nburn42/tensorflow,yongtang/tensorflow,jalexvig/tensorflow,benoitsteiner/tensorflow-xsmm,chemelnucfin/tensorflow,DavidNorman/tensorflow,ageron/tensorflow,theflofly/tensorflow,frreiss/tensorflow-fred,ghchinoy/tensorflow,allenlavoie/tensorflow,ghchinoy/tensorflow,ageron/tensorflow,theflofly/tensorflow,jart/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,petewarden/tensorflow,renyi533/tensorflow,gautam1858/tensorflow,petewarden/tensorflow,snnn/tensorflow,gunan/tensorflow,asimshankar/tensorflow,arborh/tensorflow,Intel-tensorflow/tensorflow,sarvex/tensorflow,dongjoon-hyun/tensorflow,Intel-Corporation/tensorflow,eaplatanios/tensorflow,ghchinoy/tensorflow,jendap/tensorflow,jhseu/tensorflow,girving/tensorflow,tensorflow/tensorflow,lukeiwanski/tensorflow,karllessard/tensorflow,jendap/tensorflow,theflofly/tensorflow,hfp/tensorflow-xsmm,tensorflow/tensorflow-experimental_link_static_libraries_once,kevin-coder/tensorflow-fork,drpngx/tensorflow,girving/tensorflow,alsrgv/tensorflow,frreiss/tensorflow-fred,lukeiwanski/tensorflow,dendisuhubdy/tensorflow,tensorflow/tensorflow,DavidNorman/tensorflow,adit-chandra/tensorflow,caisq/tensorflow,hehongliang/tensorflow,AnishShah/tensorflow,xzturn/tensorflow,AnishShah/tensorflow,renyi533/tensorflow,manipopopo/tensorflow,brchiu/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Xeralux/tensorflow,jalexvig/tensorflow,renyi533/tensorflow,caisq/tensorflow,nburn42/tensorflow,drpngx/tensorflow,drpngx/tensorflow,eaplatanios/tensorflow,kobejean/tensorflow,aldian/tensorflow,dancingdan/tensorflow,davidzchen/tensorflow,snnn/tensorflow,arborh/tensorflow,Xeralux/tensorflow,lukeiwanski/tensorflow,ageron/tensorflow,kevin-coder/tensorflow-fork,petewarden/tensorflow,kevin-coder/tensorflow-fork,Xeralux/tensorflow,jendap/tensorflow,alsrgv/tensorflow,arborh/tensorflow,alshedivat/tensorflow,cxxgtxy/tensorflow,kevin-coder/tensorflow-fork,dendisuhubdy/tensorflow,freedomtan/tensorflow,yongtang/tensorflow,arborh/tensorflow,kobejean/tensorflow,xodus7/tensorflow,adit-chandra/tensorflow,meteorcloudy/tensorflow,ppwwyyxx/tensorflow,seanli9jan/tensorflow,gojira/tensorflow,manipopopo/tensorflow,frreiss/tensorflow-fred,jendap/tensorflow,girving/tensorflow,ZhangXinNan/tensorflow,girving/tensorflow,Bismarrck/tensorflow,tensorflow/tensorflow-pywrap_saved_model,adit-chandra/tensorflow,tensorflow/tensorflow,gautam1858/tensorflow,snnn/tensorflow,renyi533/tensorflow,gautam1858/tensorflow,dancingdan/tensorflow,dancingdan/tensorflow,freedomtan/tensorflow,paolodedios/tensorflow,ppwwyyxx/tensorflow,yanchen036/tensorflow,annarev/tensorflow,annarev/tensorflow,jart/tensorflow,ageron/tensorflow,Bismarrck/tensorflow,jalexvig/tensorflow,snnn/tensorflow,girving/tensorflow,hfp/tensorflow-xsmm,tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,DavidNorman/tensorflow,eaplatanios/tensorflow,aam-at/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,yanchen036/tensorflow,manipopopo/tensorflow,brchiu/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,benoitsteiner/tensorflow-xsmm,jbedorf/tensorflow,hehongliang/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-pywrap_saved_model,chemelnucfin/tensorflow,dancingdan/tensorflow,dongjoon-hyun/tensorflow,snnn/tensorflow,meteorcloudy/tensorflow,brchiu/tensorflow,alsrgv/tensorflow,kobejean/tensorflow,Bismarrck/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,caisq/tensorflow,cxxgtxy/tensorflow,aam-at/tensorflow,yongtang/tensorflow,asimshankar/tensorflow,Intel-tensorflow/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,nburn42/tensorflow,allenlavoie/tensorflow,alsrgv/tensorflow,adit-chandra/tensorflow,gojira/tensorflow,dancingdan/tensorflow,frreiss/tensorflow-fred,nburn42/tensorflow,AnishShah/tensorflow,seanli9jan/tensorflow,Intel-Corporation/tensorflow,hfp/tensorflow-xsmm,arborh/tensorflow,eaplatanios/tensorflow,ZhangXinNan/tensorflow,gojira/tensorflow,ppwwyyxx/tensorflow,karllessard/tensorflow,aam-at/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,alshedivat/tensorflow,seanli9jan/tensorflow,apark263/tensorflow,jhseu/tensorflow,ppwwyyxx/tensorflow,asimshankar/tensorflow,paolodedios/tensorflow,yongtang/tensorflow,ageron/tensorflow,kevin-coder/tensorflow-fork,girving/tensorflow,aselle/tensorflow,allenlavoie/tensorflow,aselle/tensorflow,drpngx/tensorflow,manipopopo/tensorflow,yongtang/tensorflow,kevin-coder/tensorflow-fork,annarev/tensorflow,Xeralux/tensorflow,dongjoon-hyun/tensorflow,jendap/tensorflow,Intel-Corporation/tensorflow,davidzchen/tensorflow,arborh/tensorflow,dongjoon-hyun/tensorflow,renyi533/tensorflow,jhseu/tensorflow,alshedivat/tensorflow,jendap/tensorflow,AnishShah/tensorflow,Bismarrck/tensorflow,Xeralux/tensorflow,gautam1858/tensorflow,petewarden/tensorflow,aselle/tensorflow,tensorflow/tensorflow,jbedorf/tensorflow,DavidNorman/tensorflow,hehongliang/tensorflow,yanchen036/tensorflow,brchiu/tensorflow,xzturn/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,hfp/tensorflow-xsmm,kobejean/tensorflow,xzturn/tensorflow,tensorflow/tensorflow,hehongliang/tensorflow,Xeralux/tensorflow,gunan/tensorflow,karllessard/tensorflow,dongjoon-hyun/tensorflow,gunan/tensorflow,sarvex/tensorflow,aldian/tensorflow,manipopopo/tensorflow,dendisuhubdy/tensorflow,adit-chandra/tensorflow,lukeiwanski/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,allenlavoie/tensorflow,nburn42/tensorflow,nburn42/tensorflow,tensorflow/tensorflow,alshedivat/tensorflow,alshedivat/tensorflow,xodus7/tensorflow,xzturn/tensorflow,karllessard/tensorflow,alsrgv/tensorflow,ghchinoy/tensorflow,gunan/tensorflow,dendisuhubdy/tensorflow,seanli9jan/tensorflow,jart/tensorflow,annarev/tensorflow,jbedorf/tensorflow,cxxgtxy/tensorflow,yongtang/tensorflow,brchiu/tensorflow,freedomtan/tensorflow,freedomtan/tensorflow,ppwwyyxx/tensorflow,arborh/tensorflow,paolodedios/tensorflow,theflofly/tensorflow,chemelnucfin/tensorflow,caisq/tensorflow,benoitsteiner/tensorflow-xsmm,brchiu/tensorflow,adit-chandra/tensorflow,nburn42/tensorflow,dendisuhubdy/tensorflow,jendap/tensorflow,paolodedios/tensorflow,adit-chandra/tensorflow,arborh/tensorflow,brchiu/tensorflow,AnishShah/tensorflow,gunan/tensorflow,jendap/tensorflow,xodus7/tensorflow,renyi533/tensorflow,jendap/tensorflow,jbedorf/tensorflow,caisq/tensorflow,AnishShah/tensorflow,ageron/tensorflow,dendisuhubdy/tensorflow,manipopopo/tensorflow,xzturn/tensorflow,freedomtan/tensorflow,aldian/tensorflow,davidzchen/tensorflow,ZhangXinNan/tensorflow,xodus7/tensorflow,jart/tensorflow,hfp/tensorflow-xsmm,apark263/tensorflow,frreiss/tensorflow-fred,Intel-tensorflow/tensorflow,jbedorf/tensorflow,hehongliang/tensorflow,alsrgv/tensorflow,manipopopo/tensorflow,allenlavoie/tensorflow,paolodedios/tensorflow,theflofly/tensorflow,kobejean/tensorflow,Xeralux/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,kevin-coder/tensorflow-fork,ZhangXinNan/tensorflow,alsrgv/tensorflow,chemelnucfin/tensorflow,petewarden/tensorflow,eaplatanios/tensorflow,gautam1858/tensorflow,gautam1858/tensorflow,chemelnucfin/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_saved_model,paolodedios/tensorflow,theflofly/tensorflow,xzturn/tensorflow,meteorcloudy/tensorflow,karllessard/tensorflow,annarev/tensorflow,aldian/tensorflow,apark263/tensorflow,yongtang/tensorflow,karllessard/tensorflow,petewarden/tensorflow,Intel-Corporation/tensorflow,gojira/tensorflow,kobejean/tensorflow,gautam1858/tensorflow,lukeiwanski/tensorflow,apark263/tensorflow,gunan/tensorflow,jhseu/tensorflow,ageron/tensorflow,theflofly/tensorflow,jhseu/tensorflow,AnishShah/tensorflow,aselle/tensorflow,renyi533/tensorflow,girving/tensorflow,yanchen036/tensorflow,gojira/tensorflow,aam-at/tensorflow,alsrgv/tensorflow,tensorflow/tensorflow,xzturn/tensorflow,asimshankar/tensorflow,freedomtan/tensorflow,renyi533/tensorflow,dendisuhubdy/tensorflow,lukeiwanski/tensorflow,brchiu/tensorflow,jendap/tensorflow,kevin-coder/tensorflow-fork,brchiu/tensorflow,arborh/tensorflow,Bismarrck/tensorflow,allenlavoie/tensorflow,Intel-tensorflow/tensorflow,ppwwyyxx/tensorflow,manipopopo/tensorflow,adit-chandra/tensorflow,aam-at/tensorflow,benoitsteiner/tensorflow-xsmm,drpngx/tensorflow,girving/tensorflow,gojira/tensorflow,karllessard/tensorflow,ghchinoy/tensorflow,caisq/tensorflow,chemelnucfin/tensorflow,paolodedios/tensorflow,sarvex/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-experimental_link_static_libraries_once,girving/tensorflow,seanli9jan/tensorflow,tensorflow/tensorflow-pywrap_saved_model,dancingdan/tensorflow,annarev/tensorflow,aam-at/tensorflow,seanli9jan/tensorflow,annarev/tensorflow,benoitsteiner/tensorflow-xsmm,alshedivat/tensorflow,karllessard/tensorflow,yongtang/tensorflow,eaplatanios/tensorflow,aselle/tensorflow,aldian/tensorflow,dongjoon-hyun/tensorflow,seanli9jan/tensorflow,meteorcloudy/tensorflow,davidzchen/tensorflow,asimshankar/tensorflow,jbedorf/tensorflow,hehongliang/tensorflow,tensorflow/tensorflow-pywrap_saved_model,davidzchen/tensorflow,xzturn/tensorflow,dendisuhubdy/tensorflow,apark263/tensorflow,jalexvig/tensorflow,benoitsteiner/tensorflow-xsmm,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,aselle/tensorflow,aam-at/tensorflow,asimshankar/tensorflow,karllessard/tensorflow,davidzchen/tensorflow,benoitsteiner/tensorflow-xsmm,seanli9jan/tensorflow,arborh/tensorflow,DavidNorman/tensorflow,yanchen036/tensorflow,ppwwyyxx/tensorflow,paolodedios/tensorflow,manipopopo/tensorflow,tensorflow/tensorflow-pywrap_saved_model,drpngx/tensorflow,tensorflow/tensorflow,AnishShah/tensorflow,dancingdan/tensorflow,sarvex/tensorflow,kevin-coder/tensorflow-fork,alshedivat/tensorflow,cxxgtxy/tensorflow,lukeiwanski/tensorflow,renyi533/tensorflow,gojira/tensorflow,frreiss/tensorflow-fred,gunan/tensorflow,karllessard/tensorflow,adit-chandra/tensorflow,freedomtan/tensorflow,benoitsteiner/tensorflow-xsmm,tensorflow/tensorflow,aam-at/tensorflow,aselle/tensorflow,ZhangXinNan/tensorflow,benoitsteiner/tensorflow-xsmm,AnishShah/tensorflow,caisq/tensorflow,sarvex/tensorflow,DavidNorman/tensorflow,aselle/tensorflow,eaplatanios/tensorflow,xodus7/tensorflow,theflofly/tensorflow,kobejean/tensorflow,asimshankar/tensorflow,meteorcloudy/tensorflow,aam-at/tensorflow,jart/tensorflow,ZhangXinNan/tensorflow,drpngx/tensorflow,apark263/tensorflow,annarev/tensorflow,aam-at/tensorflow,dancingdan/tensorflow,gojira/tensorflow,ppwwyyxx/tensorflow,ZhangXinNan/tensorflow,meteorcloudy/tensorflow,gunan/tensorflow,snnn/tensorflow,arborh/tensorflow,theflofly/tensorflow,yanchen036/tensorflow,aam-at/tensorflow,alshedivat/tensorflow,renyi533/tensorflow,snnn/tensorflow,drpngx/tensorflow,ghchinoy/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,gunan/tensorflow,alsrgv/tensorflow,alshedivat/tensorflow,frreiss/tensorflow-fred,petewarden/tensorflow,theflofly/tensorflow,jbedorf/tensorflow,allenlavoie/tensorflow,apark263/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-Corporation/tensorflow,apark263/tensorflow,tensorflow/tensorflow,xzturn/tensorflow,karllessard/tensorflow,ageron/tensorflow,tensorflow/tensorflow-pywrap_saved_model,Intel-tensorflow/tensorflow,dendisuhubdy/tensorflow,hfp/tensorflow-xsmm,sarvex/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,cxxgtxy/tensorflow,jhseu/tensorflow,Bismarrck/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,chemelnucfin/tensorflow,Intel-tensorflow/tensorflow,adit-chandra/tensorflow,manipopopo/tensorflow,xodus7/tensorflow,alsrgv/tensorflow,alshedivat/tensorflow,Bismarrck/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,gautam1858/tensorflow,Intel-Corporation/tensorflow,ghchinoy/tensorflow,gojira/tensorflow,jhseu/tensorflow,nburn42/tensorflow,hfp/tensorflow-xsmm,eaplatanios/tensorflow,gunan/tensorflow,paolodedios/tensorflow,chemelnucfin/tensorflow,freedomtan/tensorflow,lukeiwanski/tensorflow,Bismarrck/tensorflow,seanli9jan/tensorflow,theflofly/tensorflow,ghchinoy/tensorflow,allenlavoie/tensorflow,freedomtan/tensorflow,alshedivat/tensorflow,jalexvig/tensorflow,alsrgv/tensorflow,apark263/tensorflow,ageron/tensorflow,jart/tensorflow,ghchinoy/tensorflow,ageron/tensorflow,aldian/tensorflow,asimshankar/tensorflow,gunan/tensorflow,meteorcloudy/tensorflow,ghchinoy/tensorflow,jalexvig/tensorflow,adit-chandra/tensorflow,meteorcloudy/tensorflow,benoitsteiner/tensorflow-xsmm,xodus7/tensorflow,freedomtan/tensorflow,petewarden/tensorflow,chemelnucfin/tensorflow,DavidNorman/tensorflow,brchiu/tensorflow,yanchen036/tensorflow,allenlavoie/tensorflow,allenlavoie/tensorflow,lukeiwanski/tensorflow,snnn/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_saved_model,aselle/tensorflow,kobejean/tensorflow,drpngx/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,seanli9jan/tensorflow,frreiss/tensorflow-fred,annarev/tensorflow,Intel-Corporation/tensorflow,sarvex/tensorflow,jalexvig/tensorflow,jart/tensorflow,kobejean/tensorflow,asimshankar/tensorflow,jalexvig/tensorflow