def __init__(self, rng, inputVar, cfgParams, copyLayer=None, layerNum=None):
"""
:type rng: numpy.random.RandomState
:param rng: a random number generator used to initialize weights
:type inputVar: theano.tensor.dtensor4
:param inputVar: symbolic image tensor, of shape image_shape
:type cfgParams: ConvLayerParams
"""
self.cfgParams = cfgParams
poolsize = cfgParams.poolsize
poolType = cfgParams.poolType
self.inputVar = inputVar
if poolType == 0:
pooled_out = pool.pool_2d(input = inputVar,
ds = poolsize, ignore_border=True)
self.output = pooled_out
# store parameters of this layer; has none
self.params = []
self.weights = []
评论列表
文章目录