Record Class TransformerStack
java.lang.Object
java.lang.Record
io.github.kirstenali.deepj.transformer.TransformerStack
A simple sequential stack of
TransformerBlocks.
This exists to make transformer composition explicit (instead of reusing a generic Sequential).
-
Constructor Summary
ConstructorsConstructorDescriptionTransformerStack(List<TransformerBlock> blocks) Creates an instance of aTransformerStackrecord class. -
Method Summary
Modifier and TypeMethodDescriptionblocks()Returns the value of theblocksrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TransformerStack
Creates an instance of aTransformerStackrecord class.- Parameters:
blocks- the value for theblocksrecord component
-
-
Method Details
-
forward
-
backward
-
parameters
- Specified by:
parametersin interfaceTrainable
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
blocks
Returns the value of theblocksrecord component.- Returns:
- the value of the
blocksrecord component
-