Package ai.djl.nn
Interface BlockFactory
-
- All Superinterfaces:
java.io.Serializable
public interface BlockFactory extends java.io.Serializable
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 byModelZoo
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Block
newBlock(Model model, java.nio.file.Path modelPath, java.util.Map<java.lang.String,?> arguments)
Constructs the uninitialized block.
-
-
-
Method Detail
-
newBlock
Block newBlock(Model model, java.nio.file.Path modelPath, java.util.Map<java.lang.String,?> arguments) throws java.io.IOException
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:
java.io.IOException
- if IO operation fails during creating block
-
-