98b18cadf44257fde77b36ada1729feaab3aed97,examples/word_language_model/train.py,,,#,13

Before Change


    iterator_train__use_cuda=use_cuda,
    iterator_test__use_cuda=use_cuda)

params = [
    {
        "lr": [20],
        "iterator_train__bptt": [5, 10],
    },
]

pl = GridSearchCV(trainer, params)
pl.fit(corpus.train[:1000], corpus.train[:1000])

After Change


import data
import learner

parser = argparse.ArgumentParser(description="PyTorch PennTreeBank RNN/LSTM Language Model")
parser.add_argument("--data", type=str, default="./data/penn",
                    help="location of the data corpus")
parser.add_argument("--bptt", type=int, default=35,
                    help="sequence length")
parser.add_argument("--batch_size", type=int, default=20, metavar="N",
                    help="batch size")
parser.add_argument("--seed", type=int, default=1111,
                    help="random seed")
parser.add_argument("--no-cuda", dest="cuda", action="store_false",
                    help="use CUDA")
parser.add_argument("--save", type=str,  default="model.pt",
                    help="path to save the final model")
args = parser.parse_args()


class LRAnnealing(inferno.callbacks.Callback):
    def on_epoch_end(self, net, **kwargs):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 16

Instances


Project Name: dnouri/skorch
Commit Name: 98b18cadf44257fde77b36ada1729feaab3aed97
Time: 2017-07-25
Author: marian.tietz@ottogroup.com
File Name: examples/word_language_model/train.py
Class Name:
Method Name:


Project Name: bsmurphy/PyKrige
Commit Name: 3c1a7ef24205af6e243580e9ddc0bb2ec3299576
Time: 2015-10-23
Author: bscott.murphy@gmail.com
File Name: setup.py
Class Name:
Method Name:


Project Name: dnouri/skorch
Commit Name: 98b18cadf44257fde77b36ada1729feaab3aed97
Time: 2017-07-25
Author: marian.tietz@ottogroup.com
File Name: examples/word_language_model/train.py
Class Name:
Method Name:


Project Name: GoogleCloudPlatform/ml-on-gcp
Commit Name: 8079adae33711e4886a625df3f0ae9860739f7b9
Time: 2019-09-03
Author: yuhanliu@google.com
File Name: example_zoo/tools/process.py
Class Name:
Method Name: