![]() |
IOLink C# 1.16.1
|
A model of a tensor. More...
Public Member Functions | |
| TensorView (global::System.IntPtr cPtr, bool cMemoryOwn) | |
| virtual TensorCapabilitySet | GetCapabilities () |
| Get the capabilities of the tensor. | |
| bool | Support (TensorCapabilitySet capabilities) |
| Shortcut to check if capabilities are supported by the tensor. | |
| virtual VectorXu64 | GetShape () |
| Get the shape of the tensor. | |
| uint | GetDimensionCount () |
| Shortcut to get the number of dimensions of the tensor. | |
| virtual DataType | GetDtype () |
| Get the data type of the tensor. | |
| string | ToString () |
| Return a string representation. | |
| unsafe void | Read (RegionXu64 region, byte[] dst) |
| Read data from a given region into a destination buffer. | |
| unsafe void | Write (RegionXu64 region, byte[] src) |
| Write data from a source buffer into a given region of the tensor. | |
| virtual void | Reshape (VectorXu64 shape, DataType dtype) |
Public Member Functions inherited from IOLink.View | |
| View (global::System.IntPtr cPtr, bool cMemoryOwn) | |
| void | Dispose () |
| T | Extension< T > () |
| Get an extension, with automatic upcasting. | |
| virtual Extension | Extension (uint id) |
| ViewOriginExtension | ViewOrigin () |
| Shortcut to access to ViewOrigin extension. | |
Static Public Member Functions | |
| static global::System.Runtime.InteropServices.HandleRef | getCPtr (TensorView obj) |
Static Public Member Functions inherited from IOLink.View | |
| static global::System.Runtime.InteropServices.HandleRef | getCPtr (View obj) |
Protected Member Functions | |
| override void | Dispose (bool disposing) |
Properties | |
| TensorCapabilitySet | Capabilities [get] |
| VectorXu64 | Shape [get] |
| uint | DimensionCount [get] |
| DataType | Dtype [get] |
A model of a tensor.
Tensors are simple multidimensional arrays that can be used to represent data in a structured way. They can be used to represent images, audio, text, or any other type of data that can be represented as a multidimensional array.
|
inlineprotectedvirtual |
Reimplemented from IOLink.View.
|
inlinevirtual |
Get the capabilities of the tensor.
|
inline |
Shortcut to get the number of dimensions of the tensor.
|
inlinevirtual |
Get the data type of the tensor.
|
inlinevirtual |
Get the shape of the tensor.
|
inline |
Read data from a given region into a destination buffer.
| region | The region of the tensor to read from. |
| dst | The destination buffer where the read data will be copied. |
| NotImplemented | If the implementation does not support reading. |
| InvalidArgument | If the region is not compatible with the tensor's shape. |
|
inline |
Shortcut to check if capabilities are supported by the tensor.
| capabilities | The set of capabilities to check. |
|
inline |
Write data from a source buffer into a given region of the tensor.
| region | The region of the tensor to write to. |
| src | The source buffer containing the data that will be written. |
| NotImplemented | If the implementation does not support writing. |
| InvalidArgument | If the region is not compatible with the tensor's shape. |