Package ai.djl.nn.core
Class Linear.Builder
java.lang.Object
ai.djl.nn.core.Linear.Builder
- Enclosing class:
- Linear
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
units
protected long units
-
-
Constructor Details
-
Builder
protected Builder()
-
-
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
-