Deep.Net


HostTensor

Namespace: Tensor

Host tensor functions.

Functions and values

Function or valueDescription
arange
Signature: int64 -> Tensor<int64>
Dev
Signature: ITensorDevice

Tensor located on host using a .NET array as storage.

falses
Signature: int64 list -> Tensor<bool>
filled
Signature: int64 list -> 'T -> Tensor<'T>
Type parameters: 'T
identity
Signature: int64 -> Tensor<'T>
Type parameters: 'T
init
Signature: int64 list -> (int64 [] -> 'T) -> Tensor<'T>
Type parameters: 'T
linspace start stop nElems
Signature: start:^?182840 -> stop:^?182840 -> nElems:int64 -> Tensor<^?182840>
Type parameters: ^?182840, ^?182841, ^?182842, ^?182843
ofArray data
Signature: data:'T [] -> Tensor<'T>
Type parameters: 'T

Creates a one-dimensional Tensor using the specified data. The data is copied.

ofArray2D data
Signature: data:'T [,] -> Tensor<'T>
Type parameters: 'T

Creates a two-dimensional Tensor using the specified data. The data is copied.

ofArray3D data
Signature: data:'T [,,] -> Tensor<'T>
Type parameters: 'T

Creates a three-dimensional Tensor using the specified data. The data is copied.

ofArray4D data
Signature: data:'T [,,,] -> Tensor<'T>
Type parameters: 'T

Creates a four-dimensional Tensor using the specified data. The data is copied.

ofList data
Signature: data:'T list -> Tensor<'T>
Type parameters: 'T

Creates a one-dimensional Tensor using the specified list.

ofList2D data
Signature: data:'T list list -> Tensor<'T>
Type parameters: 'T

Creates a two-dimensional Tensor using the specified list of lists.

ofSeq data
Signature: data:seq<'T> -> Tensor<'T>
Type parameters: 'T

Creates a one-dimensional Tensor using the specified sequence.

ofSeqWithShape shape data
Signature: shape:int64 list -> data:seq<'T> -> Tensor<'T>
Type parameters: 'T

Creates a one-dimensional Tensor using the specified sequence and shape.

ones
Signature: int64 list -> Tensor<'T>
Type parameters: 'T
read hdf5 path
Signature: hdf5:HDF5 -> path:string -> Tensor<'T>
Type parameters: 'T

Reads the tensor of data type 'T with the given path from an HDF5 file.

readUntyped hdf5 path
Signature: hdf5:HDF5 -> path:string -> ITensor

Reads the tensor with the given path from an HDF5 file and returns it as an ITensor with the data type as stored in the HDF5 file.

scalar
Signature: 'T -> Tensor<'T>
Type parameters: 'T
toArray ary
Signature: ary:Tensor<'?182863> -> '?182863 []
Type parameters: '?182863

Creates an Array from the data in this Tensor. The data is copied.

toArray2D ary
Signature: ary:Tensor<'?182865> -> '?182865 [,]
Type parameters: '?182865

Creates an Array2D from the data in this Tensor. The data is copied.

toArray3D ary
Signature: ary:Tensor<'?182867> -> '?182867 [,,]
Type parameters: '?182867

Creates an Array3D from the data in this Tensor. The data is copied.

toArray4D ary
Signature: ary:Tensor<'?182869> -> '?182869 [,,,]
Type parameters: '?182869

Creates an Array4D from the data in this Tensor. The data is copied.

toList ary
Signature: ary:Tensor<'a> -> 'a list
Type parameters: 'a

Creates a list from the data in this Tensor. The data is copied.

transfer x
Signature: x:'?182823 -> '?182823
Type parameters: '?182823
trues
Signature: int64 list -> Tensor<bool>
usingArray data
Signature: data:'T [] -> Tensor<'T>
Type parameters: 'T

Creates a one-dimensional Tensor using the specified data. The data is referenced, not copied.

write hdf5 path x
Signature: hdf5:HDF5 -> path:string -> x:ITensor -> unit

Writes the given host tensor into the HDF5 file under the given path.

zeros
Signature: int64 list -> Tensor<'T>
Type parameters: 'T
Fork me on GitHub