diff options
author | Geoffrey Irving <geoffreyi@google.com> | 2016-01-25 09:54:42 -0800 |
---|---|---|
committer | Vijay Vasudevan <vrv@google.com> | 2016-01-25 10:49:40 -0800 |
commit | 5c13ef6db13d28ca48a70fa2d68cc928d5cb1b41 (patch) | |
tree | 7a8c81774429cd9a94496de9e30ccf369549aa40 /tensorflow/python/ops/op_def_library.py | |
parent | 5643775f26cb3df06be2b0415ab703b9bf68e751 (diff) |
Replace make_tensor_shape_proto with TensorShape.as_proto
Also remove the deprecated TensorShape.as_dimension_list function, and remove
the to_proto argument to as_list. Both features were used only to make protos,
and that is better done directly with the as_proto method to avoid leaking
abstractions.
This brings us one step closer to hiding tf.tensor_util.
Change: 112960305
Diffstat (limited to 'tensorflow/python/ops/op_def_library.py')
-rw-r--r-- | tensorflow/python/ops/op_def_library.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/tensorflow/python/ops/op_def_library.py b/tensorflow/python/ops/op_def_library.py index a409b81bad..d50507a4e1 100644 --- a/tensorflow/python/ops/op_def_library.py +++ b/tensorflow/python/ops/op_def_library.py @@ -194,11 +194,7 @@ def _MakeShape(v, arg_name): str(v)) break return v - s = tensor_shape.as_shape(v) - ret = tensor_shape_pb2.TensorShapeProto() - for i in s.as_dimension_list(): - ret.dim.add(size = i) - return ret + return tensor_shape.as_shape(v).as_proto() def _MakeTensor(v, arg_name): |