parameters: (self)
docstring: returns the output shape with broadcast
docstring_summary: returns the output shape with broadcast
docstring_tokens: returns the output shape with broadcast
function: def _infer_shape(self):
          """returns the output shape with broadcast"""
  
          # in case all inputs are default format/NHWC/NCHW
          is_default = [op_input.data_format in (DF.DEFAULT, DF.NHWC, DF.NCHW) for op_input in self.inputs]
          if all(is_default):
              return self.broadcast_shape([op_input.shape for op_input in self.inputs])
  
          # in case formats are fractal_nz, default_fromat/NHWC/HCHW(optional)
          is_default_frac_nz = [op_input.data_format in (DF.DEFAULT, DF.NHWC, DF.NCHW, DF.FRAC_NZ)
                                for op_input in self.inputs]
          if all(is_default_frac_nz):
              nz_shapes = [self.defaultformat_to_nz(op_input.shape) if op_input.data_format != DF.FRAC_NZ
                           else op_input.shape for op_input in self.inputs]
              return self.broadcast_shape(nz_shapes)
  
          raise GKException("Only support default and fractal_nz")
function_tokens: def _infer_shape ( self ) : # in case all inputs are default format/NHWC/NCHW is_default = [ op_input . data_format in ( DF . DEFAULT , DF . NHWC , DF . NCHW ) for op_input in self . inputs ] if all ( is_default ) : return self . broadcast_shape ( [ op_input . shape for op_input in self . inputs ] ) # in case formats are fractal_nz, default_fromat/NHWC/HCHW(optional) is_default_frac_nz = [ op_input . data_format in ( DF . DEFAULT , DF . NHWC , DF . NCHW , DF . FRAC_NZ ) for op_input in self . inputs ] if all ( is_default_frac_nz ) : nz_shapes = [ self . defaultformat_to_nz ( op_input . shape ) if op_input . data_format != DF . FRAC_NZ else op_input . shape for op_input in self . inputs ] return self . broadcast_shape ( nz_shapes ) raise GKException ( "Only support default and fractal_nz" )