Package ai.djl.nn
Interface BlockFactory
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
IdentityBlockFactory
,OnesBlockFactory
Block factory is a component to make standard for block creating and saving procedure. Block
factory design is intended to bypass the serialization of the blocks. This class can be used by
ModelZoo
or DJL Serving to recover the block to its uninitialized states. User should
combine this method with the block.loadParameter to get the block with all parameters.-
Method Summary
-
Method Details
-
newBlock
Constructs the uninitialized block.- Parameters:
model
- the model of the blockmodelPath
- the directory of the model locationarguments
- the block creation arguments- Returns:
- the uninitialized block
- Throws:
IOException
- if IO operation fails during creating block
-