c1bbd364d583149aa5acf12214ba297d3365b386,RBM.py,RBM,__init__,#RBM#,5
Before Change
def __init__(self, data, num_hidden_units):
self.num_visible_units = data.shape[0] + 1
self.num_hidden_units = num_hidden_units + 1
self.W = np.zeros([self.num_hidden_units, self.num_visible_units])
self.H = np.zeros(self.num_hidden_units)
self.V = np.zeros(self.num_visible_units)
def sigmoid(self, vector):
After Change
self.W = np.random.randn(self.num_hidden_units, self.num_visible_units)
self.H = np.zeros(self.num_hidden_units)
self.V = np.zeros(self.num_visible_units)
self.c = np.random.randn(self.num_hidden_units)
self.b = np.random.randn(self.num_visible_units)
@classmethod
def sigmoid(cls, vector):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: albertbup/deep-belief-network
Commit Name: c1bbd364d583149aa5acf12214ba297d3365b386
Time: 2015-07-14
Author: albert.busque@infantium.com
File Name: RBM.py
Class Name: RBM
Method Name: __init__
Project Name: nipy/dipy
Commit Name: 3789de488113316b303be36e2f7d4bb2e405f47f
Time: 2020-10-13
Author: arokem@gmail.com
File Name: dipy/io/tests/test_utils.py
Class Name:
Method Name: test_read_img_arr_or_path
Project Name: brightmart/text_classification
Commit Name: 30d1d32c82ec61d78004d2aec4e236804bd61158
Time: 2018-07-18
Author: xuliang@xuliangs-MacBook-Pro.local
File Name: a05_HierarchicalAttentionNetwork/p1_HierarchicalAttention_model_transformer.py
Class Name:
Method Name: test