public class ParallelWrapper
extends java.lang.Object
implements java.lang.AutoCloseable
Modifier and Type | Class and Description |
---|---|
static class |
ParallelWrapper.Builder<T extends Model> |
Modifier and Type | Field and Description |
---|---|
protected boolean |
averageUpdaters |
protected int |
averagingFrequency |
protected boolean |
isMQ |
protected java.util.concurrent.atomic.AtomicLong |
iterationsCounter |
protected boolean |
legacyAveraging |
protected java.util.List<IterationListener> |
listeners |
protected Model |
model |
protected int |
prefetchSize |
protected boolean |
reportScore |
protected java.util.concurrent.atomic.AtomicBoolean |
stopFit |
protected StatsStorageRouter |
storageRouter |
protected boolean |
wasAveraged |
protected int |
workers |
protected Trainer[] |
zoo |
Modifier | Constructor and Description |
---|---|
protected |
ParallelWrapper(Model model,
int workers,
int prefetchSize) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
fit(org.nd4j.linalg.dataset.api.iterator.DataSetIterator source)
This method takes DataSetIterator, and starts training over it by scheduling DataSets to different executors
|
void |
fit(org.nd4j.linalg.dataset.api.iterator.MultiDataSetIterator source) |
void |
setListeners(java.util.Collection<IterationListener> listeners)
This method allows you to specify IterationListeners for this model.
|
void |
setListeners(IterationListener... listeners)
This method allows you to specify IterationListeners for this model.
|
void |
setListeners(StatsStorageRouter statsStorage,
java.util.Collection<? extends IterationListener> listeners)
Set the listeners, along with a StatsStorageRouter that the results will be shuffled to (in the case of any listeners
that implement the
RoutingIterationListener interface) |
void |
setListeners(StatsStorageRouter statsStorage,
IterationListener... listeners)
Set the listeners, along with a StatsStorageRouter that the results will be shuffled to (in the case of any listeners
that implement the
RoutingIterationListener interface) |
void |
shutdown()
This method causes all threads used for parallel training to stop
|
void |
stopFit()
Will stop a fit operation from continuing to iterate.
|
protected Model model
protected int workers
protected int prefetchSize
protected int averagingFrequency
protected Trainer[] zoo
protected java.util.concurrent.atomic.AtomicLong iterationsCounter
protected boolean reportScore
protected boolean averageUpdaters
protected boolean legacyAveraging
protected boolean wasAveraged
protected java.util.concurrent.atomic.AtomicBoolean stopFit
protected java.util.List<IterationListener> listeners
protected StatsStorageRouter storageRouter
protected boolean isMQ
protected ParallelWrapper(Model model, int workers, int prefetchSize)
public void close() throws java.lang.Exception
close
in interface java.lang.AutoCloseable
java.lang.Exception
public void shutdown()
public void stopFit()
public void fit(@NonNull org.nd4j.linalg.dataset.api.iterator.MultiDataSetIterator source)
source
- public void setListeners(@NonNull java.util.Collection<IterationListener> listeners)
setListeners(StatsStorageRouter, Collection)
listeners
- Listeners to setpublic void setListeners(@NonNull IterationListener... listeners)
setListeners(StatsStorageRouter, Collection)
listeners
- Listeners to setpublic void setListeners(StatsStorageRouter statsStorage, IterationListener... listeners)
RoutingIterationListener
interface)statsStorage
- Stats storage router to place the results intolisteners
- Listeners to setpublic void setListeners(StatsStorageRouter statsStorage, java.util.Collection<? extends IterationListener> listeners)
RoutingIterationListener
interface)statsStorage
- Stats storage router to place the results intolisteners
- Listeners to setpublic void fit(@NonNull org.nd4j.linalg.dataset.api.iterator.DataSetIterator source)
source
-