Package ai.djl.nn
Class AbstractSymbolBlock
- java.lang.Object
-
- ai.djl.nn.AbstractBlock
-
- ai.djl.nn.AbstractSymbolBlock
-
- All Implemented Interfaces:
Block
,SymbolBlock
public abstract class AbstractSymbolBlock extends AbstractBlock implements SymbolBlock
AbstractSymbolBlock
is an abstract implementation ofSymbolBlock
.
-
-
Field Summary
-
Fields inherited from class ai.djl.nn.AbstractBlock
children, inputNames, inputShapes, parameters, version
-
-
Constructor Summary
Constructors Constructor Description AbstractSymbolBlock()
Constructs a newAbstractSymbolBlock
instance.AbstractSymbolBlock(byte version)
Builds an empty block with the given version for parameter serialization.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Shape[]
getOutputShapes(Shape[] inputShapes)
Returns the expected output shapes of the block for the specified input shapes.-
Methods inherited from class ai.djl.nn.AbstractBlock
addChildBlock, addParameter, beforeInitialize, cast, clear, describeInput, forward, forward, forwardInternal, forwardInternal, getChildren, getDirectParameters, getParameters, initialize, initializeChildBlocks, isInitialized, loadMetadata, loadParameters, prepare, readInputShapes, saveInputShapes, saveMetadata, saveParameters, setInitializer, setInitializer, setInitializer, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ai.djl.nn.Block
cast, clear, describeInput, forward, forward, forward, getChildren, getDirectParameters, getParameters, initialize, isInitialized, loadParameters, saveParameters, setInitializer, setInitializer, setInitializer
-
Methods inherited from interface ai.djl.nn.SymbolBlock
describeOutput, removeLastBlock
-
-
-
-
Constructor Detail
-
AbstractSymbolBlock
public AbstractSymbolBlock()
Constructs a newAbstractSymbolBlock
instance.
-
AbstractSymbolBlock
public AbstractSymbolBlock(byte version)
Builds an empty block with the given version for parameter serialization.- Parameters:
version
- the version to use for parameter serialization.
-
-
Method Detail
-
getOutputShapes
public Shape[] getOutputShapes(Shape[] inputShapes)
Returns the expected output shapes of the block for the specified input shapes.- Specified by:
getOutputShapes
in interfaceBlock
- Parameters:
inputShapes
- the shapes of the inputs- Returns:
- the expected output shapes of the block
-
-