Class: HeadCache
- Inherits:
-
Object
- Object
- HeadCache
- Defined in:
- lib/toy/models/transformer.rb
Instance Attribute Summary collapse
-
#attn ⇒ Object
Returns the value of attribute attn.
-
#head_out ⇒ Object
Returns the value of attribute head_out.
-
#k ⇒ Object
Returns the value of attribute k.
-
#q ⇒ Object
Returns the value of attribute q.
-
#v ⇒ Object
Returns the value of attribute v.
Instance Method Summary collapse
-
#initialize(q, k, v, attn, head_out) ⇒ HeadCache
constructor
A new instance of HeadCache.
Constructor Details
#initialize(q, k, v, attn, head_out) ⇒ HeadCache
Returns a new instance of HeadCache.
363 364 365 366 367 368 369 |
# File 'lib/toy/models/transformer.rb', line 363 def initialize(q, k, v, attn, head_out) @q = q @k = k @v = v @attn = attn @head_out = head_out end |
Instance Attribute Details
#attn ⇒ Object
Returns the value of attribute attn.
362 363 364 |
# File 'lib/toy/models/transformer.rb', line 362 def attn @attn end |
#head_out ⇒ Object
Returns the value of attribute head_out.
362 363 364 |
# File 'lib/toy/models/transformer.rb', line 362 def head_out @head_out end |
#k ⇒ Object
Returns the value of attribute k.
362 363 364 |
# File 'lib/toy/models/transformer.rb', line 362 def k @k end |
#q ⇒ Object
Returns the value of attribute q.
362 363 364 |
# File 'lib/toy/models/transformer.rb', line 362 def q @q end |
#v ⇒ Object
Returns the value of attribute v.
362 363 364 |
# File 'lib/toy/models/transformer.rb', line 362 def v @v end |