Class: AttnCache

Inherits:
Object
  • Object
show all
Defined in:
lib/toy/models/transformer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#concatObject

Returns the value of attribute concat.



373
374
375
# File 'lib/toy/models/transformer.rb', line 373

def concat
  @concat
end

#per_headObject

Returns the value of attribute per_head.



373
374
375
# File 'lib/toy/models/transformer.rb', line 373

def per_head
  @per_head
end