8440894e621e3922a394da25b4a0806bdabee21c,13_2_seq2seq_att.py,,,#,109
Before Change
for epoch in range(1, N_EPOCH + 1):
// Get srcs and targets from data loader
for i, (srcs, targets) in enumerate(train_loader):
for src, target in zip(srcs, targets):
train_loss = train(src, target)
print("[(%d %d%%) %.4f]" %
(epoch, epoch / N_EPOCH * 100, train_loss))
print(translate(srcs[0]), "\n")
print(translate(), "\n")
After Change
for i, (srcs, targets) in enumerate(train_loader):
train_loss = train(srcs[0], targets[0])
if i % 100 is 0:
print("[(%d %d%%) %.4f]" %
(epoch, epoch / N_EPOCH * 100, train_loss))
print(translate(srcs[0]), "\n")
print(translate(), "\n")
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 5
Instances Project Name: hunkim/PyTorchZeroToAll
Commit Name: 8440894e621e3922a394da25b4a0806bdabee21c
Time: 2017-11-02
Author: hunkim@gmail.com
File Name: 13_2_seq2seq_att.py
Class Name:
Method Name:
Project Name: UFAL-DSG/tgen
Commit Name: a886baab6b48d976f0b30addde5e588282de072f
Time: 2016-05-17
Author: odusek@ufal.mff.cuni.cz
File Name: util/select_pairs_for_ab.py
Class Name:
Method Name: main
Project Name: hunkim/PyTorchZeroToAll
Commit Name: 8440894e621e3922a394da25b4a0806bdabee21c
Time: 2017-11-02
Author: hunkim@gmail.com
File Name: 13_1_seq2seq.py
Class Name:
Method Name:
Project Name: adobe/NLP-Cube
Commit Name: 8cb499760b45f404269e61846f31134df6a2d0bc
Time: 2018-03-27
Author: dumitrescu.stefan@gmail.com
File Name: cube/generic_networks/tokenizers.py
Class Name: TieredTokenizer
Method Name: _get_tokens
Project Name: arogozhnikov/einops
Commit Name: 680f4831e6c8f3102be8d99056b746b48ce34051
Time: 2018-09-27
Author: iamfullofspam@gmail.com
File Name: einops.py
Class Name:
Method Name: reduce