Package io.github.kirstenali.deepj.data
Class ResponseOnlyTextDataset
java.lang.Object
io.github.kirstenali.deepj.data.ResponseOnlyTextDataset
- All Implemented Interfaces:
BatchSource,StatefulBatchSource
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final record -
Constructor Summary
ConstructorsConstructorDescriptionResponseOnlyTextDataset(List<ResponseOnlyTextDataset.Source> sources, Tokenizer tokenizer, int maxSequenceLength, long seed) -
Method Summary
Modifier and TypeMethodDescriptionexamples()final BatchnextBatch(int batchSize) final longfinal voidrestoreRandomState(long state)
-
Constructor Details
-
ResponseOnlyTextDataset
public ResponseOnlyTextDataset(List<ResponseOnlyTextDataset.Source> sources, Tokenizer tokenizer, int maxSequenceLength, long seed) throws IOException - Throws:
IOException
-
-
Method Details
-
examples
-
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
-