T
- The type of the output.public final class HashingSequenceTrainer<T extends Output<T>> extends Object implements SequenceTrainer<T>
It wraps another SequenceTrainer which actually builds the SequenceModel
.
Modifier and Type | Class and Description |
---|---|
static class |
HashingSequenceTrainer.HashingSequenceTrainerProvenance
Provenance for
HashingSequenceTrainer . |
Constructor and Description |
---|
HashingSequenceTrainer(SequenceTrainer<T> trainer,
Hasher hasher) |
Modifier and Type | Method and Description |
---|---|
int |
getInvocationCount()
Returns the number of times the train method has been invoked.
|
TrainerProvenance |
getProvenance() |
String |
toString() |
SequenceModel<T> |
train(SequenceDataset<T> sequenceExamples,
Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> instanceProvenance)
This clones the
SequenceDataset , hashes each of the examples
and rewrites their feature ids before passing it to the inner trainer. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
train
public HashingSequenceTrainer(SequenceTrainer<T> trainer, Hasher hasher)
public SequenceModel<T> train(SequenceDataset<T> sequenceExamples, Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> instanceProvenance)
SequenceDataset
, hashes each of the examples
and rewrites their feature ids before passing it to the inner trainer.
This ensures the Trainer sees the data after the collisions, and thus builds the correct size data structures.
train
in interface SequenceTrainer<T extends Output<T>>
sequenceExamples
- The input dataset.instanceProvenance
- Training run specific provenance information.SequenceModel
.public int getInvocationCount()
SequenceTrainer
getInvocationCount
in interface SequenceTrainer<T extends Output<T>>
public TrainerProvenance getProvenance()
getProvenance
in interface com.oracle.labs.mlrg.olcut.provenance.Provenancable<TrainerProvenance>
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.