|
|
|
@ -1584,6 +1584,13 @@ class PriorBoxLayer(LayerBase):
|
|
|
|
|
variance):
|
|
|
|
|
super(PriorBoxLayer, self).__init__(name, 'priorbox', 0, inputs)
|
|
|
|
|
config_assert(len(inputs) == 2, 'PriorBoxLayer must have 2 input')
|
|
|
|
|
input_layer = self.get_input_layer(1)
|
|
|
|
|
config_assert(
|
|
|
|
|
input_layer.type == 'data',
|
|
|
|
|
'Expecting the second input layer of an priorbox layer to be '
|
|
|
|
|
'a data layer')
|
|
|
|
|
config_assert(input_layer.width > 0, 'The data layer must set width')
|
|
|
|
|
config_assert(input_layer.height > 0, 'The data layer must set height')
|
|
|
|
|
self.config.inputs[0].priorbox_conf.min_size.extend(min_size)
|
|
|
|
|
self.config.inputs[0].priorbox_conf.max_size.extend(max_size)
|
|
|
|
|
self.config.inputs[0].priorbox_conf.aspect_ratio.extend(aspect_ratio)
|
|
|
|
|