d5a75ba09ae0595ca284fd806475eb8d3f771387,word_language_model/main.py,,,#,16
Before Change
// Model parameters.
parser.add_argument("-model" , type=str, default="LSTM" , help="Type of recurrent net. RNN_TANH, RNN_RELU, LSTM, or GRU.")
parser.add_argument("-emsize" , type=int, default=200 , help="Size of word embeddings" )
parser.add_argument("-nhid" , type=int, default=200 , help="Number of hidden units per layer." )
parser.add_argument("-nlayers" , type=int, default=2 , help="Number of layers." )
// Optimization parameters.
parser.add_argument("-lr" , type=float, default=20 , help="Initial learning rate." )
parser.add_argument("-clip" , type=float, default=0.5 , help="Gradient clipping." )
parser.add_argument("-maxepoch" , type=int, default=6 , help="Upper epoch limit." )
parser.add_argument("-batchsize" , type=int, default=20 , help="Batch size." )
parser.add_argument("-bptt" , type=int, default=20 , help="Sequence length." )
// Device parameters.
parser.add_argument("-seed" , type=int, default=1111 , help="Random seed." )
parser.add_argument("-cuda" , action="store_true" , help="Use CUDA." )
// Misc parameters.
After Change
if not args.cuda:
print("WARNING: You have a CUDA device, so you should probably run with --cuda")
else:
torch.cuda.manual_seed(args.seed)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Load data
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: pytorch/examples
Commit Name: d5a75ba09ae0595ca284fd806475eb8d3f771387
Time: 2017-01-17
Author: adam.paszke@gmail.com
File Name: word_language_model/main.py
Class Name:
Method Name:
Project Name: dnouri/skorch
Commit Name: b11abe44d9c30b5dd4d53f62f5e6f37b3ad7b319
Time: 2017-11-15
Author: marian.tietz@ottogroup.com
File Name: examples/word_language_model/predict.py
Class Name:
Method Name:
Project Name: pytorch/examples
Commit Name: d5a75ba09ae0595ca284fd806475eb8d3f771387
Time: 2017-01-17
Author: adam.paszke@gmail.com
File Name: word_language_model/main.py
Class Name:
Method Name: