Class SequentialBlock
java.lang.Object
smile.deep.layer.LayerBlock
smile.deep.layer.SequentialBlock
- Direct Known Subclasses:
Conv2dNormActivation
A block of sequential layers. Layers will be added to it in the order
they are passed in the constructor. The forward() method of SequentialBlock
accepts any input and forwards it to the first layer it contains. It then
"chains" outputs to inputs sequentially for each subsequent module,
finally returning the output of the last layer.
-
Field Summary
Fields inherited from class LayerBlock
device, dtype, module -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.SequentialBlock(String name) Constructor.SequentialBlock(Layer... layers) Constructor. -
Method Summary
Methods inherited from class LayerBlock
add, add, asTorch, device, dtype, eval, isTraining, load, save, to, to, toString, train
-
Constructor Details
-
SequentialBlock
public SequentialBlock()Constructor. -
SequentialBlock
-
SequentialBlock
Constructor.- Parameters:
layers- the neural network layers.
-
-
Method Details
-
add
Adds a layer to the sequential block.- Parameters:
layer- a layer.- Returns:
- this object.
-
forward
-