diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-03-29 21:20:50 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-03-29 21:46:49 -0700 |
commit | 9db93a8db8fafee8092b30ae33a26248867e9b26 (patch) | |
tree | 697ab050db8bb8e07c5002e4cbd3e21ff4a060f6 /tensorflow/python/feature_column | |
parent | bf170839d2a8be1b16e0a6c6a74ac2f0dc427f96 (diff) |
Merged commit includes the following changes:
191029891 by xiejw:
Fix python script file.
--
191029336 by isaprykin:
Add .configure method to the whole hierarchy of DistributionStrategies.
--
191026971 by blamb:
Updates get_started nav and renames the beginner guides to include eager.
--
191025863 by mrry:
Add private Python API for accessing the C++ Session::*Callable API.
--
191025795 by mikecase:
Internal Change.
--
191024780 by isaprykin:
Internal change.
--
PiperOrigin-RevId: 191029891
Diffstat (limited to 'tensorflow/python/feature_column')
-rw-r--r-- | tensorflow/python/feature_column/BUILD | 1 | ||||
-rw-r--r-- | tensorflow/python/feature_column/feature_column.py | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/tensorflow/python/feature_column/BUILD b/tensorflow/python/feature_column/BUILD index 0ae9900a1d..219105d386 100644 --- a/tensorflow/python/feature_column/BUILD +++ b/tensorflow/python/feature_column/BUILD @@ -33,6 +33,7 @@ py_library( "//tensorflow/python:nn_ops", "//tensorflow/python:parsing_ops", "//tensorflow/python:platform", + "//tensorflow/python:resource_variable_ops", "//tensorflow/python:sparse_ops", "//tensorflow/python:sparse_tensor", "//tensorflow/python:string_ops", diff --git a/tensorflow/python/feature_column/feature_column.py b/tensorflow/python/feature_column/feature_column.py index 7d99fcb3e7..92c6ff21c4 100644 --- a/tensorflow/python/feature_column/feature_column.py +++ b/tensorflow/python/feature_column/feature_column.py @@ -148,6 +148,7 @@ from tensorflow.python.ops import lookup_ops from tensorflow.python.ops import math_ops from tensorflow.python.ops import nn_ops from tensorflow.python.ops import parsing_ops +from tensorflow.python.ops import resource_variable_ops from tensorflow.python.ops import sparse_ops from tensorflow.python.ops import string_ops from tensorflow.python.ops import template @@ -451,7 +452,8 @@ def linear_model(features, if cols_to_vars is not None: # Add the bias to cols_to_vars as well, converting the Variable or # PartitionedVariable to a list of Variable's. - if isinstance(bias, variables.Variable): + if (isinstance(bias, variables.Variable) or + resource_variable_ops.is_resource_variable(bias)): cols_to_vars['bias'] = [bias] else: # Must be a PartitionedVariable. cols_to_vars['bias'] = list(bias) |