Try torch normalize "-1" 1
It gets me to 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.