MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / variable_op

Function variable_op

tensorflow/python/ops/state_ops.py:43–54  ·  view source on GitHub ↗

Deprecated. Used variable_op_v2 instead.

(shape, dtype, name="Variable", set_shape=True, container="",
                shared_name="")

Source from the content-addressed store, hash-verified

41
42# pylint: disable=protected-access,g-doc-return-or-yield,g-doc-args
43def 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
57def variable_op_v2(shape, dtype, name="Variable", container="", shared_name=""):

Callers 3

basicSaveRestoreMethod · 0.85
_testNonReshapeMethod · 0.85

Calls 2

unknown_shapeMethod · 0.80
set_shapeMethod · 0.45

Tested by 3

basicSaveRestoreMethod · 0.68
_testNonReshapeMethod · 0.68