Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Untitled
a guest
Oct 21st, 2017
83
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
text
0.16 KB
| None
|
0
0
raw
download
clone
embed
print
report
import torch
def cast(cuda):
if cuda:
return lambda x: x.cuda()
else:
return lambda x: x
torch.cast = cast(False)
a = torch.cast(torch.rand(3, 3))
Add Comment
Please,
Sign In
to add comment
Public Pastes
input_select card
YAML | 1 min ago | 2.25 KB
2 log
HTML | 14 min ago | 0.07 KB
users
PHP | 15 min ago | 3.99 KB
Powershell - Example of mysqldump
PowerShell | 15 min ago | 1.03 KB
search
PHP | 16 min ago | 1.26 KB
Untitled
Go | 16 min ago | 1.80 KB
TTD Best Script
Lua | 18 min ago | 0.21 KB
topics
PHP | 18 min ago | 4.74 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!