Deep.Net


Dataset<'S>

Namespace: Datasets

A dataset of a record type 'S containing ArrayNDT<_> data variables. The first dimension of each record field is the sample. All record fields must contain the same number of samples. The default constructor expects a list of ArrayNDTs corresponding to the fields in 'S. To construct a Dataset<_> from a sequence of samples use the Dataset<_>.FromSamples method.

Constructors

ConstructorDescription
new(fieldStorages)
Signature: (fieldStorages:ITensor list) -> Dataset<'S>

Creates a non-sequence dataset using the specified field storages.

CompiledName: .ctor

new(fieldStorages, isSeq)
Signature: (fieldStorages:ITensor list * isSeq:bool) -> Dataset<'S>

CompiledName: .ctor

Instance members

Instance memberDescription
All
Signature: 'S

Returns a record of type 'S containing all samples.

CompiledName: get_All

Batches(batchSize)
Signature: batchSize:int64 -> seq<'S>

Returns a sequence of batches with the given size of this dataset. If the number of samples in this dataset is not a multiple of the batch size, the last batch will be smaller.

FieldStorages
Signature: ITensor list

list of arrays corresponding to the data of each field in the sample record

CompiledName: get_FieldStorages

GetSlice(...)
Signature: (startSmpl:int64 option * stopSmpl:int64 option * startStep:int64 option * stopStep:int64 option) -> 'S

For a sequence dataset, returns a record of type 'S containing a slice of samples and slots.

GetSlice(start, stop)
Signature: (start:int64 option * stop:int64 option) -> 'S

Returns a record of type 'S containing a slice of samples.

IsSeq
Signature: bool

true if this is a sequence dataset

CompiledName: get_IsSeq

[smpl]
Signature: smpl:int64 -> 'S

Returns a record of type 'S containing the sample with the given index.

CompiledName: get_Item

[smpl, step]
Signature: smpl:int64 * step:int64 -> 'S

For a sequence dataset, returns a record of type 'S containing the sample and slot with the given indices.

CompiledName: get_Item

Location
Signature: ITensorDevice

storage location

CompiledName: get_Location

NSamples
Signature: int64

number of samples

CompiledName: get_NSamples

NSteps
Signature: int64

number of steps for sequence dataset

CompiledName: get_NSteps

PaddedBatches(batchSize)
Signature: batchSize:int64 -> unit -> seq<'S>

Generates a function that returns a sequence of batches with the given size of this dataset. If the number of samples in this dataset is not a multiple of the batch size, the last batch will still have the specified size but is padded with zeros.

Part(start, stop)
Signature: (start:int64 * stop:int64) -> Dataset<'S>

Returns a new dataset containing the samples from start to stop.

Pretty
Signature: string

pretty string

CompiledName: get_Pretty

SampleType
Signature: Type

data type of samples

CompiledName: get_SampleType

Save(filename)
Signature: filename:string -> unit

Saves this dataset into the specified HDF5 file. The file is overwritten.

Save(hdf, hdfPrefixPath)
Signature: (hdf:HDF5 * hdfPrefixPath:string option) -> unit

Saves this dataset into the specified HDF5 file. hdfPrefixPath optionally specifies a prefix path within the HDF5 file for the dataset.

SlotBatches(batchSize slotSize)
Signature: batchSize:int64 -> slotSize:int64 -> seq<'S>

Returns a sequence of batches of time slots with size batchSize and slotSize respectively of the dataset.

TmplBatch(batchSize)
Signature: batchSize:int64 -> 'S

template batch

Static members

Static memberDescription
Load(filename)
Signature: filename:string -> Dataset<'S>

Loads a dataset from the specified HDF5 file.

Load(hdf, hdfPrefixPath)
Signature: (hdf:HDF5 * hdfPrefixPath:string option) -> Dataset<'S>

Loads a dataset from the specified HDF5 file. hdfPrefixPath optionally specifies a prefix path within the HDF5 file for the dataset.

New(samples, isSeq)
Signature: (samples:seq<'S> * isSeq:bool) -> Dataset<'S>

Constructs a dataset from samples.

Fork me on GitHub