Created
July 21, 2020 02:39
-
-
Save malfet/a8e1d4f3e8409b33cf7f0159384ca192 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
def hflip(img: torch.Tensor) -> torch.Tensor: return img.flip(-1) | |
print(torch.jit.script(hflip)(torch.rand(3, 8, 8))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment