Created
April 22, 2022 02:26
-
-
Save SomeoneSerge/2b18573dba91eaa9bb4e9e70b914d655 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#! /usr/bin/env nix-shell | |
#! nix-shell -i python -p "(import ./. { config = { allowUnfree = true; cudaSupport = true; }; }).python3.withPackages (ps: with ps; [ pytorch ])" | |
import torch | |
a = torch.randn(1, 3, 128, 128, device="cuda") | |
torch.nn.functional.conv2d(a, torch.randn(1, 3, 2, 2, device="cuda")) | |
print("ok") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment