MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / _rms

Method _rms

PATH/core/optimizers/adafactor.py:114–115  ·  view source on GitHub ↗
(self, tensor: torch.Tensor)

Source from the content-addressed store, hash-verified

112 return factored, use_first_moment
113
114 def _rms(self, tensor: torch.Tensor) -> float:
115 return tensor.norm(2) / (tensor.numel() ** 0.5)
116
117 def _approx_sq_grad(
118 self,

Callers 1

stepMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected