MCPcopy Create free account
hub / github.com/apache/singa / apply

Method apply

python/singa/opt.py:119–128  ·  view source on GitHub ↗

Performs a single optimization step. Args: param_name(String): the name of the param param_value(Tensor): param values to be update in-place grad(Tensor): param gradients; the values may be updated in this function; can

(self, param_name, param_value, param_grad)

Source from the content-addressed store, hash-verified

117 self.lr_value.copy_from(lr_value)
118
119 def apply(self, param_name, param_value, param_grad):
120 """Performs a single optimization step.
121
122 Args:
123 param_name(String): the name of the param
124 param_value(Tensor): param values to be update in-place
125 grad(Tensor): param gradients; the values may be updated
126 in this function; cannot use it anymore
127 """
128 raise NotImplementedError
129
130 @deprecated(
131 reason=

Callers 2

callMethod · 0.95
updateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected