Deprecated. Used variable_op_v2 instead.
(shape, dtype, name="Variable", set_shape=True, container="",
shared_name="")
| 41 | |
| 42 | # pylint: disable=protected-access,g-doc-return-or-yield,g-doc-args |
| 43 | def variable_op(shape, dtype, name="Variable", set_shape=True, container="", |
| 44 | shared_name=""): |
| 45 | """Deprecated. Used variable_op_v2 instead.""" |
| 46 | if not set_shape: |
| 47 | shape = tensor_shape.unknown_shape() |
| 48 | ret = gen_state_ops.variable(shape=shape, dtype=dtype, name=name, |
| 49 | container=container, shared_name=shared_name) |
| 50 | # TODO(mrry): Move this to where it is used, so we can get rid of this op |
| 51 | # wrapper? |
| 52 | if set_shape: |
| 53 | ret.set_shape(shape) |
| 54 | return ret |
| 55 | |
| 56 | |
| 57 | def variable_op_v2(shape, dtype, name="Variable", container="", shared_name=""): |