def __call__(self, x):
"""Compute feature maps from a batch of images.
This method extracts feature maps from
:obj:`conv4_3`, :obj:`conv7`, :obj:`conv8_2`,
:obj:`conv9_2`, :obj:`conv10_2`, and :obj:`conv11_2`.
Args:
x (ndarray): An array holding a batch of images.
The images should be resized to :math:`300\\times 300`.
Returns:
list of Variable:
Each variable contains a feature map.
"""
ys = super(VGG16Extractor300, self).__call__(x)
for i in range(8, 11 + 1):
h = ys[-1]
h = F.relu(self['conv{:d}_1'.format(i)](h))
h = F.relu(self['conv{:d}_2'.format(i)](h))
ys.append(h)
return ys
评论列表
文章目录