I gave that solution assuming you were doing it for regular images. Anyways, for C, the following might be a better option.

tensor = (tensor/torch.max(torch.abs(tensor))

This itself should squish the values between - 1 and +1. For B (whose values are between 0 to 1), you can use the previous formula