code: def test_prior_box(self):
      input_np = np.random.rand(2, 10, 32, 32).astype("float32")
      image_np = np.random.rand(2, 10, 40, 40).astype("float32")
      min_sizes = [2, 4]
      with self.static_graph():
          input = paddle.static.data(
              name="input", shape=[2, 10, 32, 32], dtype="float32"
          )
          image = paddle.static.data(
              name="image", shape=[2, 10, 40, 40], dtype="float32"
          )
  
          box, var = ops.prior_box(
              input=input,
              image=image,
              min_sizes=min_sizes,
              clip=True,
              flip=True,
          )
          box_np, var_np = self.get_static_graph_result(
              feed={
                  "input": input_np,
                  "image": image_np,
              },
              fetch_list=[box, var],
              with_lod=False,
          )
  
      with self.dynamic_graph():
          inputs_dy = paddle.to_tensor(input_np)
          image_dy = paddle.to_tensor(image_np)
  
          box_dy, var_dy = ops.prior_box(
              input=inputs_dy,
              image=image_dy,
              min_sizes=min_sizes,
              clip=True,
              flip=True,
          )
          box_dy_np = box_dy.numpy()
          var_dy_np = var_dy.numpy()
  
      self.assertTrue(np.array_equal(box_np, box_dy_np))
      self.assertTrue(np.array_equal(var_np, var_dy_np))
  
imports: from __future__ import print_function
  import os, sys
  import unittest
  import numpy
  import paddle
  import ppdet.modeling.ops
  from ppdet.modeling.tests.test_base import LayerTest
label_desc: Use image node_id 1 for calling the TestPriorBox obj's underlying member method code with example usage: obj.test_prior_box() without return types