cf1cc19bb79ae4128ef5437279de475835374a46,benchmark/runtime/dgl/train.py,,train_runtime,#Any#Any#Any#Any#,9
Before Change
norm[torch.isinf(norm)] = 0
g.ndata["norm"] = norm.unsqueeze(1).to(device)
model = Net(g, x.size(1), data.num_labels).to(device)
model.train()
optimizer = torch.optim.Adam(model.parameters(), lr=0.01)
if torch.cuda.is_available():
After Change
for epoch in range(epochs):
optimizer.zero_grad()
out = model(x)
loss = F.nll_loss(out[mask], y.view(-1))
loss.backward()
optimizer.step()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: rusty1s/pytorch_geometric
Commit Name: cf1cc19bb79ae4128ef5437279de475835374a46
Time: 2019-03-19
Author: matthias.fey@tu-dortmund.de
File Name: benchmark/runtime/dgl/train.py
Class Name:
Method Name: train_runtime
Project Name: arraiy/torchgeometry
Commit Name: 5ea5760e41a3faa385027f9229db49dfcd62481e
Time: 2021-01-16
Author: sj8716643@126.com
File Name: kornia/enhance/normalize.py
Class Name:
Method Name: normalize
Project Name: arraiy/torchgeometry
Commit Name: 5ea5760e41a3faa385027f9229db49dfcd62481e
Time: 2021-01-16
Author: sj8716643@126.com
File Name: kornia/enhance/normalize.py
Class Name:
Method Name: denormalize