16c8363e81d624d7a48900af8335ad263bed18a7,qanta/guesser/dan.py,DanModel,forward,#DanModel#,177
Before Change
if self.bigram_field is not None:
bigram_input = input_["bigram"]
embed = self.bigram_embeddings(bigram_input)
embed = embed.sum(1) / lengths["bigram"].float().view(bigram_input.size()[0], -1)
embed = self.dropout(embed)
embedding_list.append(embed)
if self.trigram_field is not None:
After Change
if self.bigram_field is not None:
bigram_input = input_["bigram"]
embed = self.bigram_embeddings(bigram_input)
embed = self._pool(embed, lengths["bigram"].float, bigram_input.size()[0])
embed = self.dropout(embed)
embedding_list.append(embed)
if self.trigram_field is not None:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances
Project Name: Pinafore/qb
Commit Name: 16c8363e81d624d7a48900af8335ad263bed18a7
Time: 2018-02-09
Author: ski.rodriguez@gmail.com
File Name: qanta/guesser/dan.py
Class Name: DanModel
Method Name: forward