Class ControlflowListener
- java.lang.Object
-
- org.nd4j.autodiff.listeners.BaseListener
-
- org.nd4j.autodiff.listeners.debugging.ControlflowListener
-
- All Implemented Interfaces:
Listener
public class ControlflowListener extends BaseListener
-
-
Constructor Summary
Constructors Constructor Description ControlflowListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isActive(Operation operation)
Returns whether this listener is active during the given operation.void
operationEnd(SameDiff sd, Operation op)
Called at the end of an operation, e.g.void
operationStart(SameDiff sd, Operation op)
Called at the start of an operation, e.g.void
opExecution(SameDiff sd, At at, MultiDataSet batch, SameDiffOp op, OpContext opContext, INDArray[] outputs)
Called at the end of each operation executionvoid
preOpExecution(SameDiff sd, At at, SameDiffOp op, OpContext opContext)
Called just before each operation is executed (native code called, etc) - after all inputs etc have been set-
Methods inherited from class org.nd4j.autodiff.listeners.BaseListener
activationAvailable, epochEnd, epochStart, iterationDone, iterationStart, preUpdate, requiredVariables, validationDone
-
-
-
-
Method Detail
-
isActive
public boolean isActive(Operation operation)
Description copied from interface:Listener
Returns whether this listener is active during the given operation. If this returns false for the given operation, those listener methods will not be called.
-
operationStart
public void operationStart(SameDiff sd, Operation op)
Description copied from interface:Listener
Called at the start of an operation, e.g. training or validation- Specified by:
operationStart
in interfaceListener
- Overrides:
operationStart
in classBaseListener
- Parameters:
sd
- The SameDiff instanceop
- The operation being started
-
operationEnd
public void operationEnd(SameDiff sd, Operation op)
Description copied from interface:Listener
Called at the end of an operation, e.g. training or validation- Specified by:
operationEnd
in interfaceListener
- Overrides:
operationEnd
in classBaseListener
- Parameters:
sd
- The SameDiff instanceop
- The operation being started
-
preOpExecution
public void preOpExecution(SameDiff sd, At at, SameDiffOp op, OpContext opContext)
Description copied from interface:Listener
Called just before each operation is executed (native code called, etc) - after all inputs etc have been set- Specified by:
preOpExecution
in interfaceListener
- Overrides:
preOpExecution
in classBaseListener
- Parameters:
sd
- The SameDiff instanceat
- Current iteration/epoch etcop
- Operation that has just been executed
-
opExecution
public void opExecution(SameDiff sd, At at, MultiDataSet batch, SameDiffOp op, OpContext opContext, INDArray[] outputs)
Description copied from interface:Listener
Called at the end of each operation execution
Note: Outputs will most likely be freed later, use detach() if you need to save it.
- Specified by:
opExecution
in interfaceListener
- Overrides:
opExecution
in classBaseListener
- Parameters:
sd
- The SameDiff instanceat
- Current iteration/epoch etcbatch
- The batch's input data. May be null if not called with a batchop
- Operation that has just been executedoutputs
- The output arrays for the just-executed operation
-
-