public class RecordConverter extends Object
| Modifier and Type | Method and Description |
|---|---|
static INDArray |
toArray(Collection<? extends Writable> record)
Convert a record to an INDArray.
|
static INDArray |
toArray(DataType dataType,
Collection<? extends Writable> record)
Convert a record to an INDArray.
|
static INDArray |
toArray(DataType dataType,
Collection<Writable> record,
int size)
Convert a record to an ndarray
|
static INDArray |
toMatrix(DataType dataType,
List<List<Writable>> records)
Convert a set of records in to a matrix
|
static INDArray |
toMatrix(List<List<Writable>> records)
Convert a set of records in to a matrix
As per
toMatrix(DataType, List) but hardcoded to Float datatype |
static INDArray |
toMinibatchArray(@NonNull List<? extends Writable> l)
Convert a record to an INDArray, for use in minibatch training.
|
static List<Writable> |
toRecord(INDArray array)
Convert an ndarray to a record
|
static List<Writable> |
toRecord(Schema schema,
List<Object> source)
Convert a collection into a `List
|
static List<List<Writable>> |
toRecords(DataSet dataSet)
Convert a DataSet to a matrix
|
static List<List<Writable>> |
toRecords(INDArray matrix)
Convert a set of records in to a matrix
|
static INDArray |
toTensor(List<List<List<Writable>>> records)
Convert a set of records in to a matrix
|
public static INDArray toArray(DataType dataType, Collection<Writable> record, int size)
record - the record to convertpublic static List<List<Writable>> toRecords(INDArray matrix)
matrix - the records ot convertpublic static INDArray toTensor(List<List<List<Writable>>> records)
records - the records ot convertpublic static INDArray toMatrix(List<List<Writable>> records)
toMatrix(DataType, List) but hardcoded to Float datatyperecords - the records ot convertpublic static INDArray toMatrix(DataType dataType, List<List<Writable>> records)
records - the records ot convertpublic static INDArray toArray(Collection<? extends Writable> record)
toArray(DataType, Collection) but hardcoded to Float datatyperecord - the record to convertpublic static INDArray toArray(DataType dataType, Collection<? extends Writable> record)
record - the record to convertpublic static INDArray toMinibatchArray(@NonNull @NonNull List<? extends Writable> l)
l - the records to convertfor the "single example concatenation" version of this methodpublic static List<Writable> toRecord(INDArray array)
array - the array to convertpublic static List<Writable> toRecord(Schema schema, List<Object> source)
Copyright © 2020. All rights reserved.