Class: LayerCache
- Inherits:
-
Object
- Object
- LayerCache
- Defined in:
- lib/toy/models/transformer.rb
Instance Attribute Summary collapse
-
#attn_cache ⇒ Object
Returns the value of attribute attn_cache.
-
#ff_cache ⇒ Object
Returns the value of attribute ff_cache.
-
#h_norm1 ⇒ Object
Returns the value of attribute h_norm1.
-
#h_norm2 ⇒ Object
Returns the value of attribute h_norm2.
-
#rms1 ⇒ Object
Returns the value of attribute rms1.
-
#rms2 ⇒ Object
Returns the value of attribute rms2.
-
#x_attn ⇒ Object
Returns the value of attribute x_attn.
-
#x_out ⇒ Object
Returns the value of attribute x_out.
Instance Method Summary collapse
-
#initialize ⇒ LayerCache
constructor
A new instance of LayerCache.
Constructor Details
#initialize ⇒ LayerCache
Returns a new instance of LayerCache.
383 384 385 386 387 388 389 390 391 392 |
# File 'lib/toy/models/transformer.rb', line 383 def initialize @rms1 = nil @h_norm1 = nil @attn_cache = nil @x_attn = nil @rms2 = nil @h_norm2 = nil @ff_cache = nil @x_out = nil end |
Instance Attribute Details
#attn_cache ⇒ Object
Returns the value of attribute attn_cache.
381 382 383 |
# File 'lib/toy/models/transformer.rb', line 381 def attn_cache @attn_cache end |
#ff_cache ⇒ Object
Returns the value of attribute ff_cache.
381 382 383 |
# File 'lib/toy/models/transformer.rb', line 381 def ff_cache @ff_cache end |
#h_norm1 ⇒ Object
Returns the value of attribute h_norm1.
381 382 383 |
# File 'lib/toy/models/transformer.rb', line 381 def h_norm1 @h_norm1 end |
#h_norm2 ⇒ Object
Returns the value of attribute h_norm2.
381 382 383 |
# File 'lib/toy/models/transformer.rb', line 381 def h_norm2 @h_norm2 end |
#rms1 ⇒ Object
Returns the value of attribute rms1.
381 382 383 |
# File 'lib/toy/models/transformer.rb', line 381 def rms1 @rms1 end |
#rms2 ⇒ Object
Returns the value of attribute rms2.
381 382 383 |
# File 'lib/toy/models/transformer.rb', line 381 def rms2 @rms2 end |
#x_attn ⇒ Object
Returns the value of attribute x_attn.
381 382 383 |
# File 'lib/toy/models/transformer.rb', line 381 def x_attn @x_attn end |
#x_out ⇒ Object
Returns the value of attribute x_out.
381 382 383 |
# File 'lib/toy/models/transformer.rb', line 381 def x_out @x_out end |