def param_init_encoder(filter_shape, params, prefix='cnn_d'):
""" filter_shape: (number of filters, num input feature maps, filter height,
filter width)
image_shape: (batch_size, num input feature maps, image height, image width)
"""
W = np.asarray(rng.uniform(low=-0.01,high=0.01,size=filter_shape),dtype=theano.config.floatX)
b = np.zeros((filter_shape[0],), dtype=theano.config.floatX)
params[_p(prefix,'W')] = W
params[_p(prefix,'b')] = b
return params
评论列表
文章目录