class_docstr: Helper class for dealing with Tensor shapes of different layouts
class_docstr_tok: ["Helper","class","for","dealing","with","Tensor","shapes","of","different","layouts"]
code: def __init__(self, shape: List[int], layout="NHWC"):
      if layout == "NHCWB16":
          self.height = int(shape[1])
          self.width = int(shape[3])
          self.depth = int(shape[2]) * int(shape[4])
      else:
          # identity layout is NHWC but the shape is not always 4
          length = len(shape)
          if length == 4:
              self.height = int(shape[1])
              self.width = int(shape[2])
              self.depth = int(shape[3])
          elif length == 3:
              self.height = int(shape[0])
              self.width = int(shape[1])
              self.depth = int(shape[2])
          elif length == 2:
              self.height = int(shape[0])
              self.width = int(shape[1])
              self.depth = 1
          elif length == 1:
              self.height = int(shape[0])
              self.width = 1
              self.depth = 1
  
imports: from typing import Tuple, List, Dict, Optional
  from functools import reduce
  import math
  import numpy
  import tvm
  from .None import BlockConfig
  from .None import StripeConfig
  from .None import Propagator
label_desc: Use image node_id 1 to create a new _Shape object  with example: obj = _Shape(shape, layout)