93ff2240f329431e77f3e613a8dbfaab911c82e9,keras/layers/recurrent.py,JZS1,__init__,#JZS1#Any#Any#Any#Any#Any#Any#Any#Any#Any#,392
Before Change
self.b_h = shared_zeros((self.output_dim))
// P_h used to project X onto different dimension
P = np.ones((self.input_dim, self.output_dim), dtype=theano.config.floatX)
P = P / np.linalg.norm(P, axis=0)
self.Pmat = theano.shared(P, name=None)
self.params = [
self.W_z, self.b_z,
self.W_r, self.U_r, self.b_r,
After Change
weights=None, truncate_gradient=-1, return_sequences=False):
super(JZS1,self).__init__()
self.input_dim = input_dim
self.output_dim = output_dim
self.truncate_gradient = truncate_gradient
self.return_sequences = return_sequences
self.init = initializations.get(init)
self.inner_init = initializations.get(inner_init)
self.activation = activations.get(activation)
self.inner_activation = activations.get(inner_activation)
self.input = T.tensor3()
self.W_z = self.init((self.input_dim, self.output_dim))
self.b_z = shared_zeros((self.output_dim))
self.W_r = self.init((self.input_dim, self.output_dim))
self.U_r = self.inner_init((self.output_dim, self.output_dim))
self.b_r = shared_zeros((self.output_dim))
self.U_h = self.inner_init((self.output_dim, self.output_dim))
self.b_h = shared_zeros((self.output_dim))
// P_h used to project X onto different dimension, using sparse random projections
if self.input_dim == self.output_dim:
self.Pmat = theano.shared(np.identity(self.output_dim), name=None)
else:
P = np.random.binomial(1, 0.5, size=(self.input_dim, self.output_dim)) * 2 - 1
P = 1 / np.sqrt(self.input_dim) * P
self.Pmat = theano.shared(P, name=None)
self.params = [
self.W_z, self.b_z,
self.W_r, self.U_r, self.b_r,
self.U_h, self.b_h,
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 11
Instances
Project Name: keras-team/keras
Commit Name: 93ff2240f329431e77f3e613a8dbfaab911c82e9
Time: 2015-06-25
Author: lchen3@gmail.com
File Name: keras/layers/recurrent.py
Class Name: JZS1
Method Name: __init__
Project Name: microsoft/nni
Commit Name: 9d468d2c742491af2d2f506c648ddc95ffea6a64
Time: 2019-10-20
Author: lanny@mail.hfut.edu.cn
File Name: src/sdk/pynni/nni/compression/tensorflow/builtin_pruners.py
Class Name: SensitivityPruner
Method Name: calc_mask
Project Name: keras-team/keras
Commit Name: 93ff2240f329431e77f3e613a8dbfaab911c82e9
Time: 2015-06-25
Author: lchen3@gmail.com
File Name: keras/layers/recurrent.py
Class Name: JZS2
Method Name: __init__
Project Name: keras-team/keras
Commit Name: 93ff2240f329431e77f3e613a8dbfaab911c82e9
Time: 2015-06-25
Author: lchen3@gmail.com
File Name: keras/layers/recurrent.py
Class Name: JZS1
Method Name: __init__