def __init__(self, inputs, maxpool_height, maxpool_width):
if inputs is None:
self.inputs = T.tensor4(dtype=theano.config.floatX)
else:
self.inputs = inputs.flatten(4)
self.maxpool_height = maxpool_height
self.maxpool_width = maxpool_width
self.outputs = pool.pool_2d(
self.inputs,
(maxpool_height, maxpool_width),
ignore_border=True
)
# Pooling layer has no learnable parameters.
self.params = []
# Possible layer types.
评论列表
文章目录