c1a72b36444c8027c27c2dc02dc03d5b69a5e389,keras/layers/recurrent_convolutional.py,LSTMConv2D,get_constants,#LSTMConv2D#Any#,482
Before Change
def get_constants(self, x):
constants = []
if 0 < self.dropout_U < 1:
ones = K.ones_like(K.reshape(x[:, 0, 0], (-1, 1)))
ones = K.concatenate([ones] * self.output_dim, 1)
B_U = [K.in_train_phase(K.dropout(ones, self.dropout_U), ones)
for _ in range(4)]
After Change
def get_constants(self, x):
constants = []
if 0 < self.dropout_U < 1:
ones = K.zeros_like(x)
ones = K.sum(ones, axis=1)
ones = self.conv_step(ones, K.zeros(self.W_shape),
border_mode=self.border_mode)
ones = ones + 1
B_U = [K.in_train_phase(K.dropout(ones, self.dropout_U), ones)
for _ in range(4)]
constants.append(B_U)
else:
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 4
Instances
Project Name: keras-team/keras
Commit Name: c1a72b36444c8027c27c2dc02dc03d5b69a5e389
Time: 2016-10-13
Author: jeanmichel.arbona@gmail.com
File Name: keras/layers/recurrent_convolutional.py
Class Name: LSTMConv2D
Method Name: get_constants
Project Name: keras-team/keras
Commit Name: 9efe17aeeafc6d8c1406a48f82fc63731d4b2b6c
Time: 2016-02-29
Author: francois.chollet@gmail.com
File Name: keras/layers/recurrent.py
Class Name: Recurrent
Method Name: get_initial_states
Project Name: dmlc/gluon-nlp
Commit Name: 1f9ad444b5dee8b2562b7bfa1cf9f576fa32a347
Time: 2020-07-31
Author: 37728728+ZheyuYe@users.noreply.github.com
File Name: src/gluonnlp/models/electra.py
Class Name: ElectraForPretrain
Method Name: get_corrupted_tokens
Project Name: dmlc/gluon-nlp
Commit Name: 4e6f3c26ada09786a1fa97ee174668af588cdd76
Time: 2018-08-16
Author: linhaibin.eric@gmail.com
File Name: gluonnlp/model/sampled_block.py
Class Name: _SampledLogitsHelper
Method Name: hybrid_forward
Project Name: chainer/chainercv
Commit Name: c1ca4716e333662ec20d1804ea9f4e73b8b53136
Time: 2017-05-28
Author: yuyuniitani@gmail.com
File Name: chainercv/links/model/faster_rcnn/faster_rcnn_train_chain.py
Class Name: FasterRCNNTrainChain
Method Name: __call__