Allow functions of `DistributedVariable`s to implement `custom_gradient`
Allow functions of `DistributedVariable`s to implement `custom_gradient`

Previously, variables created by functions decorated with `custom_gradient` had to pass:
```python 
isinstance(v, resource_variable_ops.ResourceVariable)
```
Now, they must pass:
```python
resource_variable_ops.is_resource_variable(v)
```
This allows functions of `DistributedVariables` (which already have the method `_should_act_as_resource_variable`) to implement `custom_gradient`, which is necessary for cross-replica batch normalization, among other things.
kevin-coder/tensorflow-fork,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,karllessard/tensorflow,yongtang/tensorflow,Intel-Corporation/tensorflow,davidzchen/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gunan/tensorflow,jbedorf/tensorflow,alsrgv/tensorflow,frreiss/tensorflow-fred,jhseu/tensorflow,annarev/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,xzturn/tensorflow,ageron/tensorflow,freedomtan/tensorflow,xzturn/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,paolodedios/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow-pywrap_saved_model,Intel-Corporation/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,karllessard/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,DavidNorman/tensorflow,sarvex/tensorflow,ageron/tensorflow,aldian/tensorflow,kevin-coder/tensorflow-fork,cxxgtxy/tensorflow,frreiss/tensorflow-fred,jbedorf/tensorflow,arborh/tensorflow,jbedorf/tensorflow,gautam1858/tensorflow,theflofly/tensorflow,kevin-coder/tensorflow-fork,renyi533/tensorflow,jbedorf/tensorflow,renyi533/tensorflow,Intel-Corporation/tensorflow,jhseu/tensorflow,aam-at/tensorflow,ageron/tensorflow,ghchinoy/tensorflow,freedomtan/tensorflow,yongtang/tensorflow,arborh/tensorflow,jhseu/tensorflow,ghchinoy/tensorflow,ageron/tensorflow,kevin-coder/tensorflow-fork,alsrgv/tensorflow,Intel-tensorflow/tensorflow,adit-chandra/tensorflow,karllessard/tensorflow,arborh/tensorflow,chemelnucfin/tensorflow,Intel-tensorflow/tensorflow,karllessard/tensorflow,DavidNorman/tensorflow,tensorflow/tensorflow-pywrap_saved_model,DavidNorman/tensorflow,frreiss/tensorflow-fred,Intel-tensorflow/tensorflow,jhseu/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,karllessard/tensorflow,ppwwyyxx/tensorflow,chemelnucfin/tensorflow,annarev/tensorflow,theflofly/tensorflow,aam-at/tensorflow,cxxgtxy/tensorflow,jbedorf/tensorflow,yongtang/tensorflow,cxxgtxy/tensorflow,renyi533/tensorflow,cxxgtxy/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_saved_model,paolodedios/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow,frreiss/tensorflow-fred,arborh/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,renyi533/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,alsrgv/tensorflow,theflofly/tensorflow,ghchinoy/tensorflow,jbedorf/tensorflow,xzturn/tensorflow,theflofly/tensorflow,tensorflow/tensorflow-pywrap_saved_model,petewarden/tensorflow,paolodedios/tensorflow,alsrgv/tensorflow,ppwwyyxx/tensorflow,yongtang/tensorflow,sarvex/tensorflow,ghchinoy/tensorflow,xzturn/tensorflow,renyi533/tensorflow,theflofly/tensorflow,DavidNorman/tensorflow,ghchinoy/tensorflow,frreiss/tensorflow-fred,jbedorf/tensorflow,jhseu/tensorflow,annarev/tensorflow,gautam1858/tensorflow,theflofly/tensorflow,renyi533/tensorflow,cxxgtxy/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,chemelnucfin/tensorflow,theflofly/tensorflow,yongtang/tensorflow,kevin-coder/tensorflow-fork,alsrgv/tensorflow,ageron/tensorflow,Intel-tensorflow/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_tf_optimizer,aldian/tensorflow,freedomtan/tensorflow,ageron/tensorflow,jhseu/tensorflow,jbedorf/tensorflow,ghchinoy/tensorflow,aam-at/tensorflow,freedomtan/tensorflow,ageron/tensorflow,gautam1858/tensorflow,ageron/tensorflow,ppwwyyxx/tensorflow,chemelnucfin/tensorflow,paolodedios/tensorflow,kevin-coder/tensorflow-fork,tensorflow/tensorflow-experimental_link_static_libraries_once,kevin-coder/tensorflow-fork,gautam1858/tensorflow,Intel-tensorflow/tensorflow,ppwwyyxx/tensorflow,DavidNorman/tensorflow,sarvex/tensorflow,aam-at/tensorflow,aam-at/tensorflow,jhseu/tensorflow,chemelnucfin/tensorflow,freedomtan/tensorflow,paolodedios/tensorflow,xzturn/tensorflow,renyi533/tensorflow,ppwwyyxx/tensorflow,petewarden/tensorflow,petewarden/tensorflow,ghchinoy/tensorflow,chemelnucfin/tensorflow,ppwwyyxx/tensorflow,petewarden/tensorflow,theflofly/tensorflow,davidzchen/tensorflow,aam-at/tensorflow,arborh/tensorflow,tensorflow/tensorflow,xzturn/tensorflow,alsrgv/tensorflow,Intel-Corporation/tensorflow,Intel-Corporation/tensorflow,alsrgv/tensorflow,aam-at/tensorflow,jhseu/tensorflow,davidzchen/tensorflow,karllessard/tensorflow,karllessard/tensorflow,petewarden/tensorflow,alsrgv/tensorflow,ageron/tensorflow,paolodedios/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow,paolodedios/tensorflow,frreiss/tensorflow-fred,adit-chandra/tensorflow,aam-at/tensorflow,sarvex/tensorflow,ageron/tensorflow,gautam1858/tensorflow,annarev/tensorflow,Intel-tensorflow/tensorflow,aam-at/tensorflow,xzturn/tensorflow,paolodedios/tensorflow,Intel-tensorflow/tensorflow,ghchinoy/tensorflow,adit-chandra/tensorflow,aam-at/tensorflow,frreiss/tensorflow-fred,sarvex/tensorflow,davidzchen/tensorflow,gunan/tensorflow,arborh/tensorflow,petewarden/tensorflow,kevin-coder/tensorflow-fork,freedomtan/tensorflow,jhseu/tensorflow,jbedorf/tensorflow,theflofly/tensorflow,freedomtan/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-pywrap_saved_model,jbedorf/tensorflow,gunan/tensorflow,xzturn/tensorflow,sarvex/tensorflow,petewarden/tensorflow,davidzchen/tensorflow,alsrgv/tensorflow,ageron/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,gunan/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,freedomtan/tensorflow,gautam1858/tensorflow,alsrgv/tensorflow,gautam1858/tensorflow,karllessard/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_saved_model,gautam1858/tensorflow,gautam1858/tensorflow,chemelnucfin/tensorflow,ghchinoy/tensorflow,tensorflow/tensorflow,aam-at/tensorflow,tensorflow/tensorflow,jhseu/tensorflow,xzturn/tensorflow,renyi533/tensorflow,ghchinoy/tensorflow,tensorflow/tensorflow-pywrap_saved_model,frreiss/tensorflow-fred,cxxgtxy/tensorflow,frreiss/tensorflow-fred,yongtang/tensorflow,gunan/tensorflow,kevin-coder/tensorflow-fork,aldian/tensorflow,tensorflow/tensorflow,adit-chandra/tensorflow,freedomtan/tensorflow,ppwwyyxx/tensorflow,DavidNorman/tensorflow,annarev/tensorflow,tensorflow/tensorflow,gunan/tensorflow,ppwwyyxx/tensorflow,theflofly/tensorflow,renyi533/tensorflow,annarev/tensorflow,gunan/tensorflow,gautam1858/tensorflow,aldian/tensorflow,sarvex/tensorflow,yongtang/tensorflow,gunan/tensorflow,annarev/tensorflow,DavidNorman/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,theflofly/tensorflow,renyi533/tensorflow,karllessard/tensorflow,cxxgtxy/tensorflow,adit-chandra/tensorflow,davidzchen/tensorflow,karllessard/tensorflow,petewarden/tensorflow,annarev/tensorflow,tensorflow/tensorflow,adit-chandra/tensorflow,freedomtan/tensorflow,arborh/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-pywrap_saved_model,aldian/tensorflow,annarev/tensorflow,davidzchen/tensorflow,ppwwyyxx/tensorflow,gautam1858/tensorflow,ppwwyyxx/tensorflow,davidzchen/tensorflow,davidzchen/tensorflow,arborh/tensorflow,xzturn/tensorflow,tensorflow/tensorflow-pywrap_saved_model,DavidNorman/tensorflow,ppwwyyxx/tensorflow,gunan/tensorflow,arborh/tensorflow,gunan/tensorflow,yongtang/tensorflow,chemelnucfin/tensorflow,jhseu/tensorflow,Intel-Corporation/tensorflow,DavidNorman/tensorflow,davidzchen/tensorflow,arborh/tensorflow,adit-chandra/tensorflow,kevin-coder/tensorflow-fork,cxxgtxy/tensorflow,kevin-coder/tensorflow-fork,frreiss/tensorflow-fred,tensorflow/tensorflow,annarev/tensorflow,theflofly/tensorflow,tensorflow/tensorflow-pywrap_saved_model,jbedorf/tensorflow,ghchinoy/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,paolodedios/tensorflow,annarev/tensorflow,ppwwyyxx/tensorflow,aldian/tensorflow,arborh/tensorflow,yongtang/tensorflow,davidzchen/tensorflow,alsrgv/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,adit-chandra/tensorflow,ghchinoy/tensorflow,ageron/tensorflow,renyi533/tensorflow,gunan/tensorflow,chemelnucfin/tensorflow,aldian/tensorflow,tensorflow/tensorflow,arborh/tensorflow,DavidNorman/tensorflow,DavidNorman/tensorflow,renyi533/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,jbedorf/tensorflow,karllessard/tensorflow,DavidNorman/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,alsrgv/tensorflow,aam-at/tensorflow,sarvex/tensorflow,chemelnucfin/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,xzturn/tensorflow,chemelnucfin/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,frreiss/tensorflow-fred,freedomtan/tensorflow,petewarden/tensorflow,aldian/tensorflow,paolodedios/tensorflow,gunan/tensorflow,paolodedios/tensorflow,jhseu/tensorflow,adit-chandra/tensorflow,xzturn/tensorflow,chemelnucfin/tensorflow,Intel-tensorflow/tensorflow