public static final class Linear.Builder
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
Linear |
build()
Returns the constructed
Linear. |
Linear.Builder |
optBias(boolean bias)
Sets the optional parameter that indicates whether to include a bias vector with default
value of true.
|
Linear.Builder |
optFlatten(boolean flatten)
Sets the optional parameter that indicates whether the input tensor should be flattened.
|
Linear.Builder |
setOutChannels(long outChannels)
Sets the number of output channels.
|
public Linear.Builder setOutChannels(long outChannels)
outChannels - the number of desired output channelspublic Linear.Builder optBias(boolean bias)
bias - whether to use a bias vector parameterpublic Linear.Builder optFlatten(boolean flatten)
If flatten is set to true, all but the first axis of input data are collapsed together. If false, all but the last axis of input data are kept the same, and the transformation applies on the last axis.
flatten - whether the input tensor should be flattened.public Linear build()
Linear.Linearjava.lang.IllegalArgumentException - if all required parameters (outChannels) have not been
set