Add shape check to TFRecordDataset
Add shape check to TFRecordDataset

The inputs of TFRecordDataset have the requirements for shapes.
However, the check was not done in the shape function. This fix
adds shape checks whenever possible.

Signed-off-by: Yong Tang <765086fe2e0c1f980161f127fec596800f327f62@outlook.com>

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