Fix issue in tf.nn.softmax where negative dims could only be -1
Fix issue in tf.nn.softmax where negative dims could only be -1

This fix tries to address the issue raised in 14916 where
negative dims could only be -1 in tf.nn.softmax.
The issue was that dims=-1 was handled as a case of "last dim"
with `is_last_dim = (dim is -1) or (dim == shape.ndims - 1)`
but the generic negative dims were never processed.

This fix adds `dim += shape.ndims` for generic negative dims.

This fix fixes 14916.

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

Intel-tensorflow/tensorflow,annarev/tensorflow,freedomtan/tensorflow,alsrgv/tensorflow,frreiss/tensorflow-fred,freedomtan/tensorflow,jbedorf/tensorflow,Bismarrck/tensorflow,ageron/tensorflow,theflofly/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,gautam1858/tensorflow,jendap/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,gunan/tensorflow,jendap/tensorflow,yongtang/tensorflow,petewarden/tensorflow,arborh/tensorflow,freedomtan/tensorflow,ppwwyyxx/tensorflow,renyi533/tensorflow,jhseu/tensorflow,frreiss/tensorflow-fred,freedomtan/tensorflow,Intel-Corporation/tensorflow,chemelnucfin/tensorflow,freedomtan/tensorflow,adit-chandra/tensorflow,frreiss/tensorflow-fred,ppwwyyxx/tensorflow,chemelnucfin/tensorflow,aldian/tensorflow,karllessard/tensorflow,jhseu/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_tf_optimizer,renyi533/tensorflow,arborh/tensorflow,freedomtan/tensorflow,ppwwyyxx/tensorflow,davidzchen/tensorflow,davidzchen/tensorflow,theflofly/tensorflow,Intel-tensorflow/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,paolodedios/tensorflow,xzturn/tensorflow,tensorflow/tensorflow-pywrap_saved_model,alsrgv/tensorflow,ageron/tensorflow,jendap/tensorflow,annarev/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,hfp/tensorflow-xsmm,apark263/tensorflow,frreiss/tensorflow-fred,jbedorf/tensorflow,jhseu/tensorflow,DavidNorman/tensorflow,paolodedios/tensorflow,jbedorf/tensorflow,renyi533/tensorflow,gautam1858/tensorflow,sarvex/tensorflow,gunan/tensorflow,theflofly/tensorflow,kevin-coder/tensorflow-fork,adit-chandra/tensorflow,yongtang/tensorflow,ageron/tensorflow,Intel-tensorflow/tensorflow,Intel-tensorflow/tensorflow,jhseu/tensorflow,sarvex/tensorflow,karllessard/tensorflow,hfp/tensorflow-xsmm,ppwwyyxx/tensorflow,arborh/tensorflow,tensorflow/tensorflow,ageron/tensorflow,tensorflow/tensorflow,chemelnucfin/tensorflow,paolodedios/tensorflow,adit-chandra/tensorflow,apark263/tensorflow,arborh/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow-pywrap_saved_model,petewarden/tensorflow,xzturn/tensorflow,gautam1858/tensorflow,jhseu/tensorflow,Intel-Corporation/tensorflow,gautam1858/tensorflow,Bismarrck/tensorflow,aam-at/tensorflow,Bismarrck/tensorflow,jendap/tensorflow,sarvex/tensorflow,kevin-coder/tensorflow-fork,ageron/tensorflow,Bismarrck/tensorflow,aam-at/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,jhseu/tensorflow,petewarden/tensorflow,xzturn/tensorflow,Intel-tensorflow/tensorflow,freedomtan/tensorflow,jbedorf/tensorflow,sarvex/tensorflow,gautam1858/tensorflow,theflofly/tensorflow,DavidNorman/tensorflow,karllessard/tensorflow,ageron/tensorflow,aam-at/tensorflow,Intel-tensorflow/tensorflow,alsrgv/tensorflow,gunan/tensorflow,alsrgv/tensorflow,Bismarrck/tensorflow,karllessard/tensorflow,yongtang/tensorflow,Bismarrck/tensorflow,theflofly/tensorflow,xzturn/tensorflow,arborh/tensorflow,cxxgtxy/tensorflow,frreiss/tensorflow-fred,karllessard/tensorflow,DavidNorman/tensorflow,petewarden/tensorflow,hfp/tensorflow-xsmm,paolodedios/tensorflow,apark263/tensorflow,aldian/tensorflow,renyi533/tensorflow,sarvex/tensorflow,jendap/tensorflow,freedomtan/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,freedomtan/tensorflow,aam-at/tensorflow,paolodedios/tensorflow,davidzchen/tensorflow,petewarden/tensorflow,xzturn/tensorflow,cxxgtxy/tensorflow,kevin-coder/tensorflow-fork,aam-at/tensorflow,frreiss/tensorflow-fred,jendap/tensorflow,yongtang/tensorflow,apark263/tensorflow,cxxgtxy/tensorflow,Intel-tensorflow/tensorflow,jbedorf/tensorflow,adit-chandra/tensorflow,annarev/tensorflow,DavidNorman/tensorflow,xzturn/tensorflow,hfp/tensorflow-xsmm,cxxgtxy/tensorflow,theflofly/tensorflow,alsrgv/tensorflow,ageron/tensorflow,annarev/tensorflow,kevin-coder/tensorflow-fork,davidzchen/tensorflow,hfp/tensorflow-xsmm,gautam1858/tensorflow,gautam1858/tensorflow,alsrgv/tensorflow,chemelnucfin/tensorflow,chemelnucfin/tensorflow,freedomtan/tensorflow,gunan/tensorflow,tensorflow/tensorflow,aldian/tensorflow,ghchinoy/tensorflow,jendap/tensorflow,Bismarrck/tensorflow,ghchinoy/tensorflow,renyi533/tensorflow,apark263/tensorflow,jbedorf/tensorflow,ppwwyyxx/tensorflow,arborh/tensorflow,jhseu/tensorflow,theflofly/tensorflow,renyi533/tensorflow,yongtang/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_tf_optimizer,sarvex/tensorflow,davidzchen/tensorflow,ageron/tensorflow,annarev/tensorflow,Intel-tensorflow/tensorflow,jhseu/tensorflow,kevin-coder/tensorflow-fork,ghchinoy/tensorflow,xzturn/tensorflow,aam-at/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,davidzchen/tensorflow,jbedorf/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,gautam1858/tensorflow,aam-at/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,annarev/tensorflow,tensorflow/tensorflow-pywrap_saved_model,arborh/tensorflow,davidzchen/tensorflow,aldian/tensorflow,ghchinoy/tensorflow,kevin-coder/tensorflow-fork,davidzchen/tensorflow,sarvex/tensorflow,hfp/tensorflow-xsmm,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,ppwwyyxx/tensorflow,frreiss/tensorflow-fred,yongtang/tensorflow,arborh/tensorflow,petewarden/tensorflow,gautam1858/tensorflow,gunan/tensorflow,Bismarrck/tensorflow,adit-chandra/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,ppwwyyxx/tensorflow,theflofly/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,arborh/tensorflow,paolodedios/tensorflow,frreiss/tensorflow-fred,aldian/tensorflow,petewarden/tensorflow,apark263/tensorflow,gunan/tensorflow,davidzchen/tensorflow,hfp/tensorflow-xsmm,tensorflow/tensorflow-pywrap_saved_model,renyi533/tensorflow,xzturn/tensorflow,jhseu/tensorflow,yongtang/tensorflow,chemelnucfin/tensorflow,aam-at/tensorflow,ppwwyyxx/tensorflow,chemelnucfin/tensorflow,annarev/tensorflow,karllessard/tensorflow,frreiss/tensorflow-fred,paolodedios/tensorflow,renyi533/tensorflow,jbedorf/tensorflow,gautam1858/tensorflow,paolodedios/tensorflow,ageron/tensorflow,jbedorf/tensorflow,annarev/tensorflow,gunan/tensorflow,aam-at/tensorflow,cxxgtxy/tensorflow,apark263/tensorflow,annarev/tensorflow,petewarden/tensorflow,DavidNorman/tensorflow,frreiss/tensorflow-fred,jbedorf/tensorflow,hfp/tensorflow-xsmm,gunan/tensorflow,yongtang/tensorflow,ppwwyyxx/tensorflow,ghchinoy/tensorflow,tensorflow/tensorflow,kevin-coder/tensorflow-fork,aldian/tensorflow,jhseu/tensorflow,cxxgtxy/tensorflow,annarev/tensorflow,paolodedios/tensorflow,davidzchen/tensorflow,apark263/tensorflow,tensorflow/tensorflow,ageron/tensorflow,tensorflow/tensorflow-pywrap_saved_model,theflofly/tensorflow,kevin-coder/tensorflow-fork,Bismarrck/tensorflow,ghchinoy/tensorflow,ppwwyyxx/tensorflow,Intel-tensorflow/tensorflow,apark263/tensorflow,DavidNorman/tensorflow,chemelnucfin/tensorflow,ghchinoy/tensorflow,renyi533/tensorflow,alsrgv/tensorflow,karllessard/tensorflow,petewarden/tensorflow,renyi533/tensorflow,xzturn/tensorflow,tensorflow/tensorflow,gunan/tensorflow,adit-chandra/tensorflow,alsrgv/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,xzturn/tensorflow,DavidNorman/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,DavidNorman/tensorflow,renyi533/tensorflow,aldian/tensorflow,xzturn/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,aam-at/tensorflow,Intel-tensorflow/tensorflow,theflofly/tensorflow,ppwwyyxx/tensorflow,chemelnucfin/tensorflow,Intel-Corporation/tensorflow,ghchinoy/tensorflow,gunan/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,ageron/tensorflow,cxxgtxy/tensorflow,hfp/tensorflow-xsmm,davidzchen/tensorflow,adit-chandra/tensorflow,theflofly/tensorflow,tensorflow/tensorflow,chemelnucfin/tensorflow,arborh/tensorflow,kevin-coder/tensorflow-fork,renyi533/tensorflow,sarvex/tensorflow,tensorflow/tensorflow,frreiss/tensorflow-fred,ghchinoy/tensorflow,petewarden/tensorflow,jhseu/tensorflow,aam-at/tensorflow,karllessard/tensorflow,ghchinoy/tensorflow,paolodedios/tensorflow,hfp/tensorflow-xsmm,jendap/tensorflow,hfp/tensorflow-xsmm,Intel-Corporation/tensorflow,aldian/tensorflow,ppwwyyxx/tensorflow,xzturn/tensorflow,alsrgv/tensorflow,cxxgtxy/tensorflow,Bismarrck/tensorflow,tensorflow/tensorflow,frreiss/tensorflow-fred,kevin-coder/tensorflow-fork,karllessard/tensorflow,adit-chandra/tensorflow,adit-chandra/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow,theflofly/tensorflow,ghchinoy/tensorflow,tensorflow/tensorflow-pywrap_saved_model,adit-chandra/tensorflow,adit-chandra/tensorflow,annarev/tensorflow,DavidNorman/tensorflow,jbedorf/tensorflow,DavidNorman/tensorflow,ageron/tensorflow,tensorflow/tensorflow-pywrap_saved_model,jhseu/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,ghchinoy/tensorflow,alsrgv/tensorflow,gunan/tensorflow,chemelnucfin/tensorflow,arborh/tensorflow,alsrgv/tensorflow,arborh/tensorflow,aam-at/tensorflow,Intel-Corporation/tensorflow,alsrgv/tensorflow,petewarden/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_saved_model,freedomtan/tensorflow,karllessard/tensorflow,Bismarrck/tensorflow,jendap/tensorflow,jendap/tensorflow,Intel-Corporation/tensorflow,kevin-coder/tensorflow-fork,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,davidzchen/tensorflow,DavidNorman/tensorflow,jendap/tensorflow,DavidNorman/tensorflow,apark263/tensorflow,chemelnucfin/tensorflow,jbedorf/tensorflow,apark263/tensorflow,gunan/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once