Method read
val read: HDF5 -> string -> Tensor<'T>
Reads a tensor from the specified HDF5 object path in an HDF5 file.
Declaration
val read: hdf5:HDF5 -> path:string -> Tensor<'T>
Parameters
| Type | Name | Description |
|---|---|---|
| HDF5 | hdf5 | The HDF5 file. |
| string | path | The HDF5 object path. |
Returns
| Type | Description |
|---|---|
| Tensor<'T> | A tensor filled with data read from the HDF5 file. |
Type Parameters
| Name | Description |
|---|---|
| 'T | The type of the data. This must match the type of the data stored in the HDF5 file. |
Examples
use hdfFile = HDF5.OpenRead "tensors.h5"
let k = HostTensor.read<float> hdfFile "k"
Exceptions
| Type | Condition |
|---|---|
| System.InvalidOperationException | The data type stored in the HDF5 does
not match type |