Parameter¶
- class tripy.Parameter(tensor: Any)[source]¶
Bases:
Tensor
A Parameter is a special kind of
tripy.Tensor
that is treated by the compiler as a constant, enabling additional optimization opportunities.- Parameters:
tensor (Any) – The tensor value for this parameter. If provided as an external data format (e.g., a Numpy array), it will be converted into a Tripy Tensor.
Example
1parameter = tp.Parameter(tp.Tensor([1.0, 1.0], dtype=tp.float32))
>>> parameter tensor([1.0000, 1.0000], dtype=float32, loc=gpu:0, shape=(2,))