65c9a4857e41dcde4f5dae8a77e6cdf03953646a,model/model.py,RNNFeaturizer,forward,#RNNFeaturizer#Any#Any#,70
Before Change
// get last valid cell state
if seq_len is not None:
cell = cell[(seq_len-1).view(-1).contiguous(), torch.arange(cell.size(1)).long().cuda()]
else:
cell = cell[-1]
return cell
def state_dict(self, destination=None, prefix="", keep_vars=False):
sd = {}
After Change
cell = self.get_cell_features(hidden)
else:
last_cell = 0
for i in range(input.size(0)):
emb = self.drop(self.encoder(input[i]))
_, hidden = self.rnn(emb.unsqueeze(0), collectHidden=True)
cell = self.get_cell_features(hidden)
if i > 0:
cell = get_valid_outs(i, seq_len, cell, last_cell)
last_cell = cell
return cell
def get_cell_features(self, hidden):
cell = hidden[1]
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 7
Instances
Project Name: NVIDIA/sentiment-discovery
Commit Name: 65c9a4857e41dcde4f5dae8a77e6cdf03953646a
Time: 2018-03-19
Author: raulp@dbcluster.nvidia.com
File Name: model/model.py
Class Name: RNNFeaturizer
Method Name: forward
Project Name: NVIDIA/sentiment-discovery
Commit Name: 65c9a4857e41dcde4f5dae8a77e6cdf03953646a
Time: 2018-03-19
Author: raulp@dbcluster.nvidia.com
File Name: model/model.py
Class Name: RNNFeaturizer
Method Name: forward
Project Name: open-mmlab/mmdetection
Commit Name: a6236b789b8f4e2e66c8379199f40ecef9afce06
Time: 2020-04-21
Author: 40779233+ZwwWayne@users.noreply.github.com
File Name: mmdet/core/anchor/anchor_generator.py
Class Name: AnchorGenerator
Method Name: valid_flags
Project Name: OpenNMT/OpenNMT-py
Commit Name: b87368e1e7fd832b505db9cc08015ac7af8f95de
Time: 2016-12-23
Author: jvanamersfoort@twitter.com
File Name: VAE/main.py
Class Name:
Method Name: train