Package ai.djl.nn.core
Class LinearCollection.Builder
- java.lang.Object
-
- ai.djl.nn.core.LinearCollection.Builder
-
- Enclosing class:
- LinearCollection
public static final class LinearCollection.Builder extends java.lang.ObjectThe Builder to construct aLinearCollectiontype ofBlock.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LinearCollectionbuild()Returns the constructedLinear.LinearCollection.BuilderoptBias(boolean bias)Sets the optional parameter that indicates whether to include a bias vector with default value of true.LinearCollection.BuildersetUnits(long units)Sets the number of output channels.
-
-
-
Method Detail
-
setUnits
public LinearCollection.Builder setUnits(long units)
Sets the number of output channels.- Parameters:
units- the number of desired output channels- Returns:
- this Builder
-
optBias
public LinearCollection.Builder optBias(boolean bias)
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
public LinearCollection build()
Returns the constructedLinear.- Returns:
- the constructed
Linear - Throws:
java.lang.IllegalArgumentException- if all required parameters (outChannels) have not been set
-
-