cnn_layer.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:textGAN_public 作者: dreasysnail 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号