Package io.github.kirstenali.deepj.data
Class IndexedResponseTextDataset
java.lang.Object
io.github.kirstenali.deepj.data.IndexedResponseTextDataset
- All Implemented Interfaces:
BatchSource,StatefulBatchSource,AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionIndexedResponseTextDataset(List<ResponseOnlyTextDataset.Source> sources, Tokenizer tokenizer, int maxSequenceLength, long seed) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()final BatchnextBatch(int batchSize) final longlongfinal voidrestoreRandomState(long state)
-
Constructor Details
-
IndexedResponseTextDataset
public IndexedResponseTextDataset(List<ResponseOnlyTextDataset.Source> sources, Tokenizer tokenizer, int maxSequenceLength, long seed) throws IOException - Throws:
IOException
-
-
Method Details
-
recordCount
public long recordCount() -
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-
nextBatch
- Specified by:
nextBatchin interfaceBatchSource
-
randomState
public final long randomState()- Specified by:
randomStatein interfaceStatefulBatchSource
-
restoreRandomState
public final void restoreRandomState(long state) - Specified by:
restoreRandomStatein interfaceStatefulBatchSource
-