protected static class InplaceParallelInference.ModelHolder extends Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
isCG |
protected boolean |
isMLN |
protected LoadBalanceMode |
loadBalanceMode |
protected ReentrantReadWriteLock |
modelLock |
protected AtomicLong |
position |
protected BlockingQueue<Model> |
queue |
protected List<Model> |
replicas |
protected boolean |
rootDevice |
protected Model |
sourceModel |
protected int |
targetDeviceId |
protected int |
workers |
Modifier | Constructor and Description |
---|---|
protected |
ModelHolder() |
Modifier and Type | Method and Description |
---|---|
protected Model |
acquireModel() |
protected void |
init() |
protected INDArray[] |
output(INDArray[] input,
INDArray[] inputMasks) |
protected void |
releaseModel(Model model) |
protected void |
updateModel(@NonNull Model model) |
protected Model sourceModel
protected int workers
protected boolean rootDevice
protected LoadBalanceMode loadBalanceMode
protected int targetDeviceId
protected final AtomicLong position
protected final ReentrantReadWriteLock modelLock
protected final BlockingQueue<Model> queue
protected transient boolean isCG
protected transient boolean isMLN
protected void init()
protected Model acquireModel() throws InterruptedException
InterruptedException
protected void releaseModel(Model model)
protected void updateModel(@NonNull @NonNull Model model)
Copyright © 2020. All rights reserved.