def test_prior_box(self): data_shape = [3, 224, 224] images = fluid.layers.data( name='pixel', shape=data_shape, dtype='float32') conv1 = fluid.layers.conv2d(images, 3, 3, 2) box, var = layers.prior_box( input=conv1, image=images, min_sizes=[100.0], aspect_ratios=[1.], flip=True, clip=True) assert len(box.shape) == 4 assert box.shape == var.shape assert box.shape[3] == 4
def test_prior_box(self): data_shape = [3, 224, 224] images = fluid.layers.data(name='pixel', shape=data_shape, dtype='float32') conv1 = fluid.layers.conv2d(images, 3, 3, 2) box, var = layers.prior_box(input=conv1, image=images, min_sizes=[100.0], aspect_ratios=[1.], flip=True, clip=True) assert len(box.shape) == 4 assert box.shape == var.shape assert box.shape[3] == 4