MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / __init__

Method __init__

tensorpack/callbacks/param.py:58–66  ·  view source on GitHub ↗

Args: name(str): name of the variable. shape(tuple): shape of the variable.

(self, name, shape=())

Source from the content-addressed store, hash-verified

56 """ A variable in the graph (e.g. learning_rate) can be a hyperparam."""
57
58 def __init__(self, name, shape=()):
59 """
60 Args:
61 name(str): name of the variable.
62 shape(tuple): shape of the variable.
63 """
64 self.name = name
65 self.shape = shape
66 self._readable_name, self.var_name = get_op_tensor_name(name)
67
68 def setup_graph(self):
69 """ Will setup the assign operator for that variable. """

Callers

nothing calls this directly

Calls 1

get_op_tensor_nameFunction · 0.85

Tested by

no test coverage detected