class_docstr: Inspired by https://github.com/kuangliu/pytorch-src
  Transform between (bboxes, lables) <-> SSD output
  
  dboxes: default boxes in size 8732 x 4,
      encoder: input ltrb format, output xywh format
      decoder: input xywh format, output ltrb format
  
  encode:
      input  : bboxes_in (Tensor nboxes x 4), labels_in (Tensor nboxes)
      output : bboxes_out (Tensor 8732 x 4), labels_out (Tensor 8732)
      criteria : IoU threshold of bboexes
  
  decode:
      input  : bboxes_in (Tensor 8732 x 4), scores_in (Tensor 8732 x nitems)
      output : bboxes_out (Tensor nboxes x 4), labels_out (Tensor nboxes)
      criteria : IoU threshold of bboexes
      max_output : maximum number of output bboxes
docstr: 将box格式从xywh转换回ltrb, 将预测目标score通过softmax处理
  Do scale and transform from xywh to ltrb
  suppose input N x 4 x num_bbox | N x label_num x num_bbox
  
  bboxes_in: 是网络预测的xywh回归参数
  scores_in: 是预测的每个default box的各目标概率
docstr_tok: ["\u5c06box\u683c\u5f0f\u4ecexywh\u8f6c\u6362\u56deltrb",",","\u5c06\u9884\u6d4b\u76ee\u6807score\u901a\u8fc7softmax\u5904\u7406","Do","scale","and","transform","from","xywh","to","ltrb","suppose","input","N","x","4","x","num_bbox","|","N","x","label_num","x","num_bbox","bboxes_in",":","\u662f\u7f51\u7edc\u9884\u6d4b\u7684xywh\u56de\u5f52\u53c2\u6570","scores_in",":","\u662f\u9884\u6d4b\u7684\u6bcf\u4e2adefault","box\u7684\u5404\u76ee\u6807\u6982\u7387"]
code: def scale_back_batch(self, bboxes_in, scores_in):
      """
      将box格式从xywh转换回ltrb, 将预测目标score通过softmax处理
      Do scale and transform from xywh to ltrb
      suppose input N x 4 x num_bbox | N x label_num x num_bbox
  
      bboxes_in: 是网络预测的xywh回归参数
      scores_in: 是预测的每个default box的各目标概率
      """
      if bboxes_in.device == torch.device("cpu"):
          self.dboxes = self.dboxes.cpu()
          self.dboxes_xywh = self.dboxes_xywh.cpu()
      else:
          self.dboxes = self.dboxes.cuda()
          self.dboxes_xywh = self.dboxes_xywh.cuda()
  
      # Returns a view of the original tensor with its dimensions permuted.
      bboxes_in = bboxes_in.permute(0, 2, 1)
      scores_in = scores_in.permute(0, 2, 1)
      # print(bboxes_in.is_contiguous())
  
      bboxes_in[:, :, :2] = (
          self.scale_xy * bboxes_in[:, :, :2]
      )  # 预测的x, y回归参数
      bboxes_in[:, :, 2:] = (
          self.scale_wh * bboxes_in[:, :, 2:]
      )  # 预测的w, h回归参数
  
      # 将预测的回归参数叠加到default box上得到最终的预测边界框
      bboxes_in[:, :, :2] = (
          bboxes_in[:, :, :2] * self.dboxes_xywh[:, :, 2:]
          + self.dboxes_xywh[:, :, :2]
      )
      bboxes_in[:, :, 2:] = (
          bboxes_in[:, :, 2:].exp() * self.dboxes_xywh[:, :, 2:]
      )
  
      # transform format to ltrb
      l = bboxes_in[:, :, 0] - 0.5 * bboxes_in[:, :, 2]
      t = bboxes_in[:, :, 1] - 0.5 * bboxes_in[:, :, 3]
      r = bboxes_in[:, :, 0] + 0.5 * bboxes_in[:, :, 2]
      b = bboxes_in[:, :, 1] + 0.5 * bboxes_in[:, :, 3]
  
      bboxes_in[:, :, 0] = l  # xmin
      bboxes_in[:, :, 1] = t  # ymin
      bboxes_in[:, :, 2] = r  # xmax
      bboxes_in[:, :, 3] = b  # ymax
  
      return bboxes_in, F.softmax(scores_in, dim=-1)
  
imports: from math import sqrt
  import itertools
  import torch
  import torch.nn.functional
  from torch.jit.annotations import Tuple, List
  from torch import nn, Tensor
  import numpy
label_desc: Use image node_id 3 for calling the Encoder obj's underlying member method code with example usage: obj.scale_back_batch(bboxes_in, scores_in) and returns: bboxes_in,  F