d74b591ca9ca50189aff78f27048bb56c24d412a,python/baseline/pytorch/tagger/model.py,RNNTaggerModel,drop_inputs,#RNNTaggerModel#Any#Any#,98
Before Change
if not self.training or v == 0:
return field
drop_indices = np.where((np.random.random(field.shape) < v) & (field != RNNTaggerModel.PAD))
field[drop_indices[0], drop_indices[1] ] = RNNTaggerModel.UNK
return field
def input_tensor(self, key, batch_dict, perm_idx):
After Change
return x
mask_pad = x != RNNTaggerModel.PAD
mask_drop = x.new(x.size(0), x.size(1)).bernoulli_(v).byte()
x.masked_fill_(mask_pad & mask_drop, RNNTaggerModel.UNK)
return x
def input_tensor(self, key, batch_dict, perm_idx):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: dpressel/mead-baseline
Commit Name: d74b591ca9ca50189aff78f27048bb56c24d412a
Time: 2018-10-07
Author: dpressel@gmail.com
File Name: python/baseline/pytorch/tagger/model.py
Class Name: RNNTaggerModel
Method Name: drop_inputs
Project Name: rusty1s/pytorch_geometric
Commit Name: f2378e2242a74139dac4017bea3df29208d36bfe
Time: 2017-10-31
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/utils/mnist_monet.py
Class Name:
Method Name:
Project Name: BindsNET/bindsnet
Commit Name: a39f1f8ece8368fa7e66fed97d7c9beac9530819
Time: 2018-06-11
Author: djsaunde@umass.edu
File Name: bindsnet/network/nodes.py
Class Name: Nodes
Method Name: _reset