docstr: 将计算得到的所有anchors信息进行缓存
docstr_tok: ["\u5c06\u8ba1\u7b97\u5f97\u5230\u7684\u6240\u6709anchors\u4fe1\u606f\u8fdb\u884c\u7f13\u5b58"]
code: def cached_grid_anchors(self, grid_sizes, strides):
      # type: (List[List[int]], List[List[Tensor]]) -> List[Tensor]
      """将计算得到的所有anchors信息进行缓存"""
      key = str(grid_sizes) + str(strides)
      # self._cache是字典类型
      if key in self._cache:
          return self._cache[key]
      anchors = self.grid_anchors(grid_sizes, strides)
      self._cache[key] = anchors
      return anchors
  
imports: from typing import List, Optional, Dict, Tuple
  import torch
  from torch import nn, Tensor
  from torch.nn import functional
  import torchvision
  from .None import det_utils
  from .None import boxes
  from .image_list import ImageList
label_desc: Use image node_id 6 for calling the AnchorsGenerator obj's underlying member method code with example usage: obj.cached_grid_anchors(grid_sizes, strides) and returns: anchors, self