code: def _check_rpn_loss(self, xp):
      locs = [
          chainer.Variable(_random_array(xp, (2, 32 * 32 * 3, 4))),
          chainer.Variable(_random_array(xp, (2, 16 * 16 * 3, 4))),
          chainer.Variable(_random_array(xp, (2, 8 * 8 * 3, 4))),
      ]
      confs = [
          chainer.Variable(_random_array(xp, (2, 32 * 32 * 3))),
          chainer.Variable(_random_array(xp, (2, 16 * 16 * 3))),
          chainer.Variable(_random_array(xp, (2, 8 * 8 * 3))),
      ]
      anchors = RPN(scales=(1 / 2, 1 / 4, 1 / 8)).anchors(
          ((32, 32), (16, 16), (8, 8))
      )
      bboxes = [
          xp.array(((2, 4, 6, 7), (1, 12, 3, 30)), dtype=np.float32),
          xp.array(((10, 2, 12, 12),), dtype=np.float32),
      ]
  
      loc_loss, conf_loss = rpn_loss(
          locs, confs, anchors, ((480, 640), (320, 320)), bboxes
      )
  
      self.assertIsInstance(loc_loss, chainer.Variable)
      self.assertIsInstance(loc_loss.array, xp.ndarray)
      self.assertEqual(loc_loss.shape, ())
  
      self.assertIsInstance(conf_loss, chainer.Variable)
      self.assertIsInstance(conf_loss.array, xp.ndarray)
      self.assertEqual(conf_loss.shape, ())
  
imports: from __future__ import division
  import numpy
  import unittest
  import chainer
  from chainer import testing
  from chainer.testing import attr
  from chainercv.links.model.fpn import RPN
  from chainercv.links.model.fpn import rpn_loss
label_desc: Use image node_id 1 for calling the TestRPNLoss obj's underlying member method code with example usage: obj._check_rpn_loss(xp) without return types