class_docstr: This structure stores a list of bezier curves as a Nx16 torch.Tensor.
  It will support some common methods about bezier shapes
  (`area`, `clip`, `nonempty`, etc),
  and also behaves like a Tensor
  (support indexing, `to(device)`, `.device`, and iteration over all boxes)
  
  Attributes:
      tensor (torch.Tensor): float matrix of Nx4. Each row is (x1, y1, x2, y2).
class_docstr_tok: ["This","structure","stores","a","list","of","bezier","curves","as","a","Nx16","torch.Tensor",".","It","will","support","some","common","methods","about","bezier","shapes","(","`","area","`",",","`","clip","`",",","`","nonempty","`",",","etc",")",",","and","also","behaves","like","a","Tensor","(","support","indexing",",","`","to","(","device",")","`",",","`",".device","`",",","and","iteration","over","all","boxes",")","Attributes",":","tensor","(","torch.Tensor",")",":","float","matrix","of","Nx4",".","Each","row","is","(","x1",",","y1",",","x2",",","y2",")","."]
docstr: Args:
      tensor (Tensor[float]): a Nx4 matrix.  Each row is (x1, y1, x2, y2).
docstr_tok: ["Args",":","tensor","(","Tensor","[","float","]",")",":","a","Nx4","matrix",".","Each","row","is","(","x1",",","y1",",","x2",",","y2",")","."]
code: def __init__(self, tensor: torch.Tensor):
      """
      Args:
          tensor (Tensor[float]): a Nx4 matrix.  Each row is (x1, y1, x2, y2).
      """
      device = (
          tensor.device
          if isinstance(tensor, torch.Tensor)
          else torch.device("cpu")
      )
      tensor = torch.as_tensor(
          tensor, dtype=torch.float32, device=device
      )
      if tensor.numel() == 0:
          # Use reshape, so we don't end up creating a new tensor that does not depend on
          # the inputs (and consequently confuses jit)
          tensor = tensor.reshape((0, 16)).to(
              dtype=torch.float32, device=device
          )
      assert tensor.dim() == 2 and tensor.size(-1) == 16, tensor.size()
  
      self.tensor = tensor
  
imports: from typing import Union
  import torch
label_desc: Use image node_id 1 to create a new Beziers object  with example: obj = Beziers(tensor)