Skip to content

Instantly share code, notes, and snippets.

{
"result":{
"IL":"8Mk2kEDuOeeCjjrPf7sqag==_asB2ZqQ8jknvC4YlbxR8WFNqz4PeHU5zJUaUgiA4DM5iUhQyPI7vnpnQkLdkHpGBUjhAR7dCBOLkvhRd5/W0c9+N1A2W+SgKjVzqrfumCGCT3CKVr5lmlbfw+G6AwrFp38aibHlUKYL9c2TJhnWUjYX5yTuYqJ6D2IohnUwVGg0it9xa8gy8hJKA87urLtIXrJMeE926rM6HapjFo3GAPv+KW/gccr2/Rmg4MMTIT9xD2O3K6w2AeK8olZloRpZEN2P5Ii2a4EXyPTLjqkglsKx7Kp74aMDgUhCfcg/fRZDnjpWYQRDlUcX28LMRAFtxyKQtX1fnfc15HgwCnT5QnFWoB9a4VOLURyJeY77+t5QhPc0ldX+fIcGEgdb2UZWcRL8pubb5ead9C5FQw30HbUWt7SRcMfAQlFvPjbTXo2MArHQm7IjOLeHfvjcFDjhZ5uilLz/Ju/bdE+1VaOx1RCxOg7Gq3sCJpvvBKrF7iiw6Zpv+RGYpRQCRXoisF/i5cLYYDJZzA7nTSSZWxgvwzruUrRlkfQrykmexNiaPPV1AqKXnXBlvHFYUZptGM/V6CYERAmvWiIa8BRtllaCjNEhe2ijw45rrd3qNoPx2rKGMrocyf4aR6R47NOHeXUKLOkeUpS7MJJ6WfOSxa3IwNIKIbbCE9i2VfKHUCGqMHA7f56lskLSnH/Cpt5ojjZoHohE0WoTCsVeJJYPncUmbmhJKTeMva4tZ8kTNd4P2i6D9Vpi9lJs8o8GFjBYxJaXP2luovT0lSx4hiUUl0DiM0D4VeaJwIPq+A8grNb+m97JFgFWY94yb2xhEG6/o+kNO8C5y65ftrNnOwrVecvc4PoervsUODyo3nWc6GZwxjHAQoEN4IhBX+bsCXVdDh/AkrMnGEQj+sr0gmKPvAI0UiDZRZmQpb2fTK+kS3CusQY18P/CB0BZEFyutNzGPgG5AA4pkQWAvZr1
mport torch
import torch.nn as nn
import torch.nn.functional as F
# Test double grad for convolution
embed_layer = nn.Embedding(100, 256)
conv_layer = nn.Conv1d(256, 256, 3, padding=1)
linear_layer = nn.Linear(256, 100)
energy_layer = nn.Linear(256, 1)
embed_layer.cuda()
conv_layer.cuda()
import torch
import torch.nn as nn
from torch.autograd import Variable, grad
import torch.utils.data as Data
import torchvision
train_data = torchvision.datasets.MNIST(
root='./mnist/',
train=True,
transform=torchvision.transforms.ToTensor(),
<null>
<s>
</s>
UNK
the
,
.
of
and
to
<null>
<s>
</s>
UNK
,
.
die
der
und
in
# TRAINS SDK configuration file
api {
# Notice: 'host' is the api server (default port 8008), not the web server.
api_server: http://trains.deeplearn.org:8008
web_server: http://trains.deeplearn.org:8080
files_server: http://trains.deeplearn.org:8081
# Credentials are generated using the webapp, http://trains.deeplearn.org:8080/profile
credentials {"access_key": "R9ZERNX530SMXD1UP3LT", "secret_key": "W^xIFt_xb9pnJ9iqVB_YAH$+XzW!sY0+-pfDM-lV-sts83%^-Q"}
}
sdk {
This file has been truncated, but you can view the full file.
--------------------------------------------------------------------------
[[49815,1],0]: A high-performance Open MPI point-to-point messaging module
was unable to find any relevant network interfaces:
Module: OpenFabrics (openib)
Host: presto
Another transport will be used instead, although this may result in
lower performance.
--------------------------------------------------------------------------
This file has been truncated, but you can view the full file.
(S NP VP .) -0.03 -0.55 -0.03 -0.76 -0.35 0.40 1.01 -0.58 -0.81 0.80 -0.04 -0.25 -0.12 -0.94 1.17 0.57 -0.42 -1.55 1.20 1.51 0.07 0.07 0.02 -0.10 0.07 -0.80 0.31 0.04 -0.35 0.81 -0.46 -0.10 -0.89 0.09 -0.23 0.77 -0.81 4.04 0.20 0.39 -0.86 -0.12 0.04 -1.01 -0.77 0.35 0.92 0.04 0.68 -0.00 1.11 -1.16 0.70 -0.30 -0.50 -0.07 0.04 0.03 0.51 0.77 -0.22 0.83 0.03 -0.67 0.62 -0.21 0.35 0.13 0.77 -0.74 0.67 -0.02 -0.73 0.57 -0.01 -0.01 0.06 -0.02 -1.06 -0.46 -0.78 0.13 -0.46 -0.11 -0.02 0.93 -0.97 0.21 -0.86 -0.88 -0.10 1.05 1.21 0.08 0.61 -0.96 -0.05 0.29 1.73 -0.73 0.32 -0.12 -0.19 -0.19 -2.88 -0.82 0.01 -0.62 -2.54 0.24 -0.91 0.64 0.12 0.10 -0.74 -1.48 0.84 -1.03 0.21 -0.70 -0.25 0.22 0.17 0.72 0.79 -1.01 -0.09 0.49 0.71 1.31 0.79 -0.59 0.48 -0.04 0.85 0.07 0.69 0.85 -0.28 0.38 0.04 0.51 -0.24 -0.30 -0.44 1.96 0.05 0.09 0.10 -0.79 0.93 0.48 -0.04 -0.22 -1.19 -0.71 0.11 1.72 0.69 -0.52 -1.40 0.47 0.86 -0.80 0.74 -1.34 -0.06 0.18 -0.25 -1.87 -0.54 -0.13 -0.51 -0.97 0.02 -0.81 0.87 0.02 0.86 0.20 0.73 -0.03 1.76 -0.31
This file has been truncated, but you can view the full file.
5 (ROOT (S NP VP .))
5 (ROOT (S NP VP .))
5 (ROOT (S NP VP .))
10 (ROOT (NP NP PP :))
4 (ROOT (S NP VP .))
5 (ROOT (S NP VP .))
5 (ROOT (S NP VP .))
5 (ROOT (S NP VP .))
3 (ROOT (S NP VP .))
17 (ROOT (S S CC S : .))
This file has been truncated, but you can view the full file.
103 (ROOT (S NP VP .))
103 (ROOT (S NP VP .))
69 (ROOT (S NP VP .))
29 (ROOT (NP NP PP :))
76 (ROOT (S NP VP .))
103 (ROOT (S NP VP .))
102 (ROOT (S NP VP .))
103 (ROOT (S NP VP .))
230 (ROOT (S NP VP .))
48 (ROOT (S S CC S : .))