def initialize_layer(self):
rng = np.random.RandomState(None)
W_values = np.asarray(
rng.uniform(
low=-np.sqrt(6. / (self.n_in + self.n_out)),
high=np.sqrt(6. / (self.n_in + self.n_out)),
size=(self.n_in, self.n_out)),
dtype=theano.config.floatX)
if self.activation == nnet.sigmoid:
W_values *= 4
b_values = np.zeros((self.n_out,), dtype=theano.config.floatX)
self.W.set_value(W_values, borrow=True)
self.b.set_value(b_values, borrow=True)
convnet_3d.py 文件源码
python
阅读 19
收藏 0
点赞 0
评论 0
评论列表
文章目录