From 249bd81c3c3aa8dc89d8fcef8927df49fc8c42ec Mon Sep 17 00:00:00 2001 From: Sergei Lebedev Date: Tue, 27 Nov 2018 09:52:46 -0800 Subject: [PATCH] Automated rollback of commit 5bb5d6db8ac8f48ba2636ae18844cb584b837904 PiperOrigin-RevId: 223007492 --- tensorflow/python/ops/resource_variable_ops.py | 2 +- tensorflow/python/ops/variables.py | 9 ++------- third_party/libxsmm.BUILD | 2 +- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/tensorflow/python/ops/resource_variable_ops.py b/tensorflow/python/ops/resource_variable_ops.py index f9faa3e945c..5c74dffb055 100644 --- a/tensorflow/python/ops/resource_variable_ops.py +++ b/tensorflow/python/ops/resource_variable_ops.py @@ -1433,7 +1433,7 @@ def _from_proto_fn(v, import_scope=None): """Creates Variable or ResourceVariable from VariableDef as needed.""" if v.is_resource: return ResourceVariable.from_proto(v, import_scope=import_scope) - return variables.RefVariable.from_proto(v, import_scope=import_scope) + return variables.Variable.from_proto(v, import_scope=import_scope) ops.register_proto_function( diff --git a/tensorflow/python/ops/variables.py b/tensorflow/python/ops/variables.py index a001374e9ad..f72b19bcdde 100644 --- a/tensorflow/python/ops/variables.py +++ b/tensorflow/python/ops/variables.py @@ -968,7 +968,8 @@ class Variable(six.with_metaclass(VariableMetaclass, @staticmethod def from_proto(variable_def, import_scope=None): """Returns a `Variable` object created from `variable_def`.""" - raise NotImplementedError + return RefVariable(variable_def=variable_def, + import_scope=import_scope) class SaveSliceInfo(object): """Information on how to save this Variable as a slice. @@ -2343,12 +2344,6 @@ class RefVariable(VariableV1): else: return None - @staticmethod - def from_proto(variable_def, import_scope=None): - """Returns a `Variable` object created from `variable_def`.""" - return RefVariable(variable_def=variable_def, - import_scope=import_scope) - def __iadd__(self, other): logging.log_first_n( logging.WARN, diff --git a/third_party/libxsmm.BUILD b/third_party/libxsmm.BUILD index ee49d281abc..dc7dcc95170 100644 --- a/third_party/libxsmm.BUILD +++ b/third_party/libxsmm.BUILD @@ -38,8 +38,8 @@ genrule( ":libxsmm_interface", ], visibility = [ - "//third_party/eigen3:__pkg__", "//tensorflow/core/kernels:__pkg__", + "//third_party/eigen3:__pkg__", ], )