rlmesh.torch.from_tensor
Encode a Torch tensor as an RLMesh value.
from_tensor(tensor: object) -> Tensor | bool | int | floatParameters
| Name | Type | Description |
|---|---|---|
tensor | object | Torch tensor to encode. |
Returns
| Type | Description |
|---|---|
Tensor | bool | int | float | Tensor for non-scalar tensors, or a primitive for scalar values. |