code: def test_box_linear_coder(self):
      box_coder = _utils.BoxLinearCoder(normalize_by_size=True)
      # Generate a random 10x4 boxes tensor, with coordinates < 50.
      boxes = torch.rand(10, 4) * 50
      boxes.clamp_(
          min=1.0
      )  # tiny boxes cause numerical instability in box regression
      boxes[:, 2:] += boxes[:, :2]
  
      proposals = (
          torch.tensor([0, 0, 101, 101] * 10).reshape(10, 4).float()
      )
  
      rel_codes = box_coder.encode(boxes, proposals)
      pred_boxes = box_coder.decode(rel_codes, boxes)
      torch.allclose(proposals, pred_boxes)
  
file_path: vision/test/test_models_detection_utils.py
imports: import copy
  import pytest
  import torch
  from common_utils import assert_equal
  from torchvision.models.detection import _utils, backbone_utils
  from torchvision.models.detection.transform import GeneralizedRCNNTransform
label_desc: Use image node_id 2 for calling the TestModelsDetectionUtils obj's underlying member method code with example usage: obj.test_box_linear_coder() without return types