aaabe30363a0d74696fef432767c3961f3c5ca00,onmt/Models.py,Embeddings,__init__,#Embeddings#,34
Before Change
super(Embeddings, self).__init__()
self.positional_encoding = position_encoding
if self.positional_encoding:
self.pe = self.make_positional_encodings(embedding_dim, 5000)
self.dropout = nn.Dropout(p=dropout)
self.padding_idx = padding_idx
self.feat_merge = feat_merge
After Change
super(Embeddings, self).__init__()
self.positional_encoding = position_encoding
if self.positional_encoding:
self.pe = self.make_positional_encodings(embedding_dim, 5000).cuda()
self.dropout = nn.Dropout(p=dropout)
self.padding_idx = padding_idx
self.feat_merge = feat_merge
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: OpenNMT/OpenNMT-py
Commit Name: aaabe30363a0d74696fef432767c3961f3c5ca00
Time: 2017-09-05
Author: srush@sum1gpu01.rc.fas.harvard.edu
File Name: onmt/Models.py
Class Name: Embeddings
Method Name: __init__
Project Name: OpenNMT/OpenNMT-py
Commit Name: 03cccd0967b3ed660fac93dd9d458543bc3294d5
Time: 2017-07-13
Author: s.gehrmann@outlook.com
File Name: onmt/Models.py
Class Name: Embeddings
Method Name: __init__
Project Name: OpenNMT/OpenNMT-py
Commit Name: 1e4cfe4388a02fca88f59cbd7ae7f3213f86725a
Time: 2017-09-05
Author: srush@sum1gpu01.rc.fas.harvard.edu
File Name: onmt/Models.py
Class Name: Embeddings
Method Name: __init__