__init__

Tensor.__init__(info: Optional[TensorInfo] = None, array: Optional[ndarray] = None, tensor: Optional[Tensor] = None)

Constructor for the Tensor class.

Parameters:
  • info (TensorInfo object) -- The information of the tensor.

  • array (numpy.ndarray) -- The data of the tensor.

  • tensor (pytcim.Tensor) -- The existed pytcim tensor. Info and array will be ignored when tensor is set.