Class: AttnCache
- Inherits:
-
Object
- Object
- AttnCache
- Defined in:
- lib/toy/models/transformer.rb
Instance Attribute Summary collapse
-
#concat ⇒ Object
Returns the value of attribute concat.
-
#per_head ⇒ Object
Returns the value of attribute per_head.
Instance Method Summary collapse
-
#initialize(per_head, concat) ⇒ AttnCache
constructor
A new instance of AttnCache.
Constructor Details
#initialize(per_head, concat) ⇒ AttnCache
Returns a new instance of AttnCache.
374 375 376 377 |
# File 'lib/toy/models/transformer.rb', line 374 def initialize(per_head, concat) @per_head = per_head @concat = concat end |
Instance Attribute Details
#concat ⇒ Object
Returns the value of attribute concat.
373 374 375 |
# File 'lib/toy/models/transformer.rb', line 373 def concat @concat end |
#per_head ⇒ Object
Returns the value of attribute per_head.
373 374 375 |
# File 'lib/toy/models/transformer.rb', line 373 def per_head @per_head end |