RPN
super(RPN, self).__init__(name=name)
if not isinstance(anchor_scales, collections.Iterable):
raise TypeError("anchor_scales must be iterable")
anchor_scales = tuple(anchor_scales)
if not isinstance(anchor_ratios, collections.Iterable):
raise TypeError("anchor_ratios must be iterable")
anchor_ratios = tuple(anchor_ratios)
if not isinstance(kernel_shape, collections.Iterable):
raise TypeError("kernel_shape must be iterable")
kernel_shape = tuple(kernel_shape)
if not anchor_scales:
raise ValueError("anchor_scales must not be empty")
if not anchor_ratios:
raise ValueError("anchor_ratios must not be empty")
self._anchor_scales = anchor_scales
self._anchor_ratios = anchor_ratios
// TODO: Do we need the anchors? Can"t we just use len(self._anchor_scales) * len(self._anchor_ratios)
self._num_anchors = self.anchors.shape[0]
print(self.anchors.shape)
self._num_channels = num_channels