eugenesiow / super-image

Image super resolution models for PyTorch.
https://eugenesiow.github.io/super-image/
Apache License 2.0
162 stars 19 forks source link

Update loader.py #9

Closed thvardhan closed 1 year ago

thvardhan commented 1 year ago

added np.array to avoid a warning that is popping everytime using the load_image

UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at  ..\torch\csrc\utils\tensor_new.cpp:204.)
  return torch.as_tensor([lr])