Hi,
If you want to convert any tensor into PIL images, PyTorch already has a function that supports all modes defined in PIL and automatically converts to proper mode. Here is a snippet that simulates your case:
from torchvision.transforms import ToPILImage  # built-in function

x = torch.FloatTensor(3, 256, 256).uniform_(0, 1)  # [0, 1] float matrix
img = ToPILImage()(x)  # image corresponding to x

If you try to print values of img using print(np.array(img), it has been already converted to [0, 255].
But about your current approach which is right logically. The only problem is that numpy consider images in [height, width, Channel] format meanwhile PIL and PyTorch, expect inputs in [Channel, height, width] format. So, you have size mismatch in Image.fromarray().
To solve this issue, the dimensions just need to be swapped.
img = Image.fromarray((255*imgs[i].permute(1, 2, 0)).numpy().astype(np.uint8))

bests,
Nik