Package ai.djl.nn.core
Class LinearCollection.Builder
java.lang.Object
ai.djl.nn.core.LinearCollection.Builder
- Enclosing class:
- LinearCollection
The Builder to construct a
LinearCollection type of Block.-
Method Details
-
setUnits
Sets the number of output channels.- Parameters:
units- the number of desired output channels- Returns:
- this Builder
-
optBias
Sets the optional parameter that indicates whether to include a bias vector with default value of true.- Parameters:
bias- whether to use a bias vector parameter- Returns:
- this Builder
-
build
Returns the constructedLinear.- Returns:
- the constructed
Linear - Throws:
IllegalArgumentException- if all required parameters (outChannels) have not been set
-