3 ms·
Try torch normalize "-1" 1 It gets me to https://pytorch.org/docs/1.9.1/generated/torch.nn.functional.normalize.html https://pytorch.org/docs/1.9.1/generated/t
by omegalulw 5y ago
Try torch normalize "-1" 1
It gets me to https://pytorch.org/docs/1.9.1/generated/torch.nn.functional.normalize.html https://pytorch.org/docs/1.9.1/generated/torch.nn.functional...
Note that that will only normalize to (-inf, 1]. Tweaking the formula on that page You want (v - vmin) / (vmax - vmin + eps) with vmin and vmax produced along th dimensions you care normalizing against.