Automated rollback of commit 5bb5d6db8a

PiperOrigin-RevId: 223007492
This commit is contained in:
Sergei Lebedev 2018-11-27 09:52:46 -08:00 committed by TensorFlower Gardener
parent f382bd6279
commit 249bd81c3c
3 changed files with 4 additions and 9 deletions

View File

@ -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(

View File

@ -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,

View File

@ -38,8 +38,8 @@ genrule(
":libxsmm_interface",
],
visibility = [
"//third_party/eigen3:__pkg__",
"//tensorflow/core/kernels:__pkg__",
"//third_party/eigen3:__pkg__",
],
)