cc9990f27c34a01cb3926c3d6008fb5735cf24ad,onmt/Models.py,Embeddings,forward,#Embeddings#Any#,114
Before Change
emb = self.merge(features)
if self.positional_encoding:
emb = emb + Variable(self.pe[:emb.size(0), :1, :emb.size(2)]
.expand_as(emb))
emb = self.dropout(emb)
out_length, out_batch, emb_dim = emb.size()
After Change
emb = self.merge(features)
if self.positional_encoding:
emb = emb + Variable(self.pe[:emb.size(0), :1, :emb.size(2)]
.expand_as(emb).type_as(emb))
emb = self.dropout(emb)
out_length, out_batch, emb_dim = emb.size()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: OpenNMT/OpenNMT-py
Commit Name: cc9990f27c34a01cb3926c3d6008fb5735cf24ad
Time: 2017-09-05
Author: srush@sum1gpu01.rc.fas.harvard.edu
File Name: onmt/Models.py
Class Name: Embeddings
Method Name: forward
Project Name: OpenNMT/OpenNMT-py
Commit Name: 9b8950626fa11a68da7d0555ceb0b793ae26ec69
Time: 2017-09-07
Author: wjbianjason@163.com
File Name: onmt/Models.py
Class Name: Embeddings
Method Name: forward
Project Name: OpenNMT/OpenNMT-py
Commit Name: 7fb209842b6fdff212cb861629eae60f5a890644
Time: 2017-09-05
Author: srush@sum1gpu01.rc.fas.harvard.edu
File Name: onmt/Models.py
Class Name: Embeddings
Method Name: forward