04ad358395c7bd074ffb9af235ccb76d2c0dc4cc,examples/pna.py,,,#,62
Before Change
for epoch in range(1, 301):
train_loss, val_loss = train()
print("Epoch: {:03d}, Loss: {:.8f}, Val Loss {:.8f}".format(epoch, train_loss, val_loss))
train_acc, val_acc, test_acc = test()
print("Accuracy: train: {:.4f} val: {:.4f} test: {:.4f}".format(train_acc, val_acc, test_acc))
After Change
return self.mlp(x)
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model = Net().to(device)
optimizer = torch.optim.Adam(model.parameters(), lr=0.001)
scheduler = ReduceLROnPlateau(optimizer, mode="min", factor=0.5, patience=5,
min_lr=0.00001)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: rusty1s/pytorch_geometric
Commit Name: 04ad358395c7bd074ffb9af235ccb76d2c0dc4cc
Time: 2020-07-01
Author: matthias.fey@tu-dortmund.de
File Name: examples/pna.py
Class Name:
Method Name:
Project Name: shibing624/pycorrector
Commit Name: 61781b939bfaad37bc4ff506cd52183748e0de0d
Time: 2019-07-19
Author: 507153809@qq.com
File Name: pycorrector/seq2seq/train.py
Class Name:
Method Name: train
Project Name: kevinzakka/recurrent-visual-attention
Commit Name: a38ac8958ebf1c61a10c4d5320f1e31d3d0b73dd
Time: 2020-05-23
Author: kevinarmandzakka@gmail.com
File Name: trainer.py
Class Name: Trainer
Method Name: __init__