class_docstr: A `RegionDetector` that returns two proposals per image, for testing purposes.  The features for
  the proposal are a random 10-dimensional vector, and the coordinates are the size of the image.
class_docstr_tok: ["A","`","RegionDetector","`","that","returns","two","proposals","per","image",",","for","testing","purposes",".","The","features","for","the","proposal","are","a","random","10-dimensional","vector",",","and","the","coordinates","are","the","size","of","the","image","."]
docstr: PyTorch's random functions can't take a random seed. There is only one global
  random seed in torch, but that's not deterministic enough for us. So we use Python's
  random source to make random tensors.
docstr_tok: ["PyTorch","'s","random","functions","ca","n't","take","a","random","seed",".","There","is","only","one","global","random","seed","in","torch",",","but","that","'s","not","deterministic","enough","for","us",".","So","we","use","Python's","random","source","to","make","random","tensors","."]
code: def _seeded_random_tensor(
      self, *shape: int, device
  ) -> torch.FloatTensor:
      """PyTorch's random functions can't take a random seed. There is only one global
      random seed in torch, but that's not deterministic enough for us. So we use Python's
      random source to make random tensors."""
      result = torch.zeros(*shape, dtype=torch.float32, device=device)
      for coordinates in itertools.product(
          *(range(size) for size in result.shape)
      ):
          result[coordinates] = self.random.uniform(-1, 1)
      return result
  
imports: import itertools
  import random
  from collections import OrderedDict
  from typing import NamedTuple, Optional, List, Tuple
  import torch
  from torch import nn, FloatTensor, IntTensor, Tensor
  import torch.nn.functional
  import torchvision
  import torchvision.ops.boxes
  from allennlp.common import Registrable
label_desc: Use image node_id 2 for calling the RandomRegionDetector obj's underlying member method code with example usage: obj._seeded_random_tensor() and returns: result