class_docstr: Performs  ``x * weight.T + bias`` where ``weight`` and ``bias`` are const at compile time.
  
  Parameters
  ----------
  x: tensor<[*D,D_in], T> (Required)
      * ``1 <= rank <= 3``.
      * ``0 <= rank(*D) <= 2``.
  weight: const tensor<[D_out,D_in], T> (Required)
  bias: const tensor<[D_out],T> (Optional)
      * Default to ``0``.
  
  Returns
  -------
  tensor<[*D,D_out], T>
      * same rank as the input ``x``.
  
  Attributes
  ----------
  T: fp32
class_docstr_tok: ["Performs","``","x","*","weight.T","+","bias","``","where","``","weight","``","and","``","bias","``","are","const","at","compile","time",".","Parameters","--","--","--","--","--","x",":","tensor","<","[","*","D",",","D_in","]",",","T",">","(","Required",")","*","``","1","<","=","rank","<","=","3","``",".","*","``","0","<","=","rank","(","*","D",")","<","=","2","``",".","weight",":","const","tensor","<","[","D_out",",","D_in","]",",","T",">","(","Required",")","bias",":","const","tensor","<","[","D_out","]",",","T",">","(","Optional",")","*","Default","to","``","0","``",".","Returns","--","--","--","-","tensor","<","[","*","D",",","D_out","]",",","T",">","*","same","rank","as","the","input","``","x","``",".","Attributes","--","--","--","--","--","T",":","fp32"]
code: def type_inference(self):
      x_type = self.x.dtype
      x_shape = self.x.shape
      weight_shape = self.weight.shape
      assert len(weight_shape) == 2
  
      shape = list(x_shape)
      shape[-1] = weight_shape[0]
      return types.tensor(x_type, tuple(shape))
  
file_path: turicreate/src/external/coremltools_wrap/coremltools/coremltools/converters/mil/mil/ops/defs/linear.py
imports: from coremltools.converters.mil.mil.types.symbolic import is_symbolic
  from ._op_reqs import *
  from ._utils import broadcast_shapes
label_desc: Use image node_id 2 for calling the linear obj's underlying member method code with example usage: obj.type_inference() and returns: types