You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if return_rgb:
rgb = rgb.permute((0, 3, 1, 2))
# pytorch does not support negative slicing for the moment
# may need to look at this again because it seems to be very slow
# rgb = rgb[:, :, ::-1, :]
rgb = rgb[:, :, list(reversed(range(rgb.shape[2]))), :]
after pytorch 0.4.0, we can use following native api to do reverse, which is really faster
line 311 rasterize.py
after pytorch 0.4.0, we can use following native api to do reverse, which is really faster
And, in pytorch 1.2
just using tensor.flip()
refer to https://pytorch.org/docs/1.2.0/torch.html?highlight=flip#torch.flip
The text was updated successfully, but these errors were encountered: