Just today I googled "torch normalize -1 1" and it said "zero documents matches your query". Insane stuff. (Censorship with crazy high false positives? Incompetence?) I went to duckduckgo and immediately found a useful answer.
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.
This is really a UI problem. Google should probably use the context in this query to infer that you didn't literally want to exclude "1" from your results. However, half the comments here are complaining about Google not taking their queries extremely literally. This problem is a good demonstration of why inferring user intent can be useful and taking user input literally all the time is not actually a great idea.