87d57a3d34a1eef2c6ad5519741710e3321f136c,DialogueRNN/model.py,BiE2EModel,forward,#BiE2EModel#,304
Before Change
//emotions = emotions.unsqueeze(1)
if att2:
att_emotions = []
alpha = []
for t in emotions:
att_em, alpha_ = self.matchatt(emotions,t,mask=umask)
att_emotions.append(att_em.unsqueeze(0))
After Change
qmask = qmask.unsqueeze(1).expand(-1, T1.size(1), -1)
umask = torch.FloatTensor([1,1,1]).type(T1.type())
umask = umask.expand(-1, T1.size(1) )
emotions_f, alpha_f = self.dialog_rnn_f(U, qmask) // seq_len, batch, D_e
emotions_f = self.dropout_rec(emotions_f)
rev_U = self._reverse_seq(U, umask)
emotions_b, alpha_b = self.dialog_rnn_r(rev_U, qmask)
emotions_b = self._reverse_seq(emotions_b, umask)
emotions_b = self.dropout_rec(emotions_b)
emotions = torch.cat([emotions_f,emotions_b],dim=-1)
//print(emotions)
emotions = self.dropout_rec(emotions)
//emotions = emotions.unsqueeze(1)
if att2:
att_emotion, _ = self.matchatt(emotions,emotions[-1])
hidden = F.relu(self.linear1(att_emotion))
else:
hidden = F.relu(self.linear1(emotions[-1] ))
//hidden = F.relu(self.linear2(hidden))
//hidden = F.relu(self.linear3(hidden))
hidden = self.dropout(hidden)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances Project Name: SenticNet/conv-emotion
Commit Name: 87d57a3d34a1eef2c6ad5519741710e3321f136c
Time: 2019-03-19
Author: 40890991+soujanyaporia@users.noreply.github.com
File Name: DialogueRNN/model.py
Class Name: BiE2EModel
Method Name: forward
Project Name: NVIDIA/flownet2-pytorch
Commit Name: dc636cbfe370dc20574d068f693902178379841c
Time: 2017-12-18
Author: freda@dhcp-172-20-232-236.nvidia.com
File Name: datasets.py
Class Name: ImagesFromFolder
Method Name: __getitem__
Project Name: eriklindernoren/PyTorch-YOLOv3
Commit Name: 25f0ab0874ca0a0cd006d761141923fc9d1e7236
Time: 2018-05-29
Author: eriklindernoren@gmail.com
File Name: test.py
Class Name:
Method Name:
Project Name: nerox8664/pytorch2keras
Commit Name: ad2100bf40e81c9964b9f4c8a3e5a9dbf5f4efd9
Time: 2018-11-24
Author: nerox8664@gmail.com
File Name: tests/layers/view.py
Class Name: TestView
Method Name: forward