0ad33d606682537466f3430fc6d6ac7d47460f1a,beginner_source/nlp/deep_learning_tutorial.py,,,#,294

Before Change



// Run on test data before we train, just to see a before-and-after
for instance, label in test_data:
    bow_vec = autograd.Variable(make_bow_vector(instance, word_to_ix))
    log_probs = model(bow_vec)
    print(log_probs)

// Print the matrix column corresponding to "creo"

After Change


with torch.no_grad():
    sample = data[0]
    bow_vector = make_bow_vector(sample[0], word_to_ix)
    log_probs = model(bow_vector)
    print(log_probs)


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: pytorch/tutorials
Commit Name: 0ad33d606682537466f3430fc6d6ac7d47460f1a
Time: 2018-04-24
Author: soumith@gmail.com
File Name: beginner_source/nlp/deep_learning_tutorial.py
Class Name:
Method Name:


Project Name: kevinzakka/recurrent-visual-attention
Commit Name: f466871be6ee80533c997cf6c958aa41a697936f
Time: 2018-01-22
Author: kevinarmandzakka@gmail.com
File Name: trainer.py
Class Name: Trainer
Method Name: train_one_epoch


Project Name: huggingface/neuralcoref
Commit Name: 70cab1d286a8717185e5b342f1923a80fc9a90a0
Time: 2019-10-22
Author: svlandeg@users.noreply.github.com
File Name: neuralcoref/train/evaluator.py
Class Name: ConllEvaluator
Method Name: get_max_score