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