Class: CooCoo::Trainer::BatchStats
- Defined in:
- lib/coo-coo/trainer/batch_stats.rb
Instance Attribute Summary collapse
-
#batch ⇒ Object
readonly
Returns the value of attribute batch.
-
#batch_size ⇒ Object
readonly
Returns the value of attribute batch_size.
-
#total_loss ⇒ Object
readonly
Returns the value of attribute total_loss.
-
#total_time ⇒ Object
readonly
Returns the value of attribute total_time.
-
#trainer ⇒ Object
readonly
Returns the value of attribute trainer.
Instance Method Summary collapse
- #average_loss ⇒ Object
- #average_time ⇒ Object
-
#initialize(trainer, batch, batch_size, total_time, total_loss) ⇒ BatchStats
constructor
A new instance of BatchStats.
Constructor Details
#initialize(trainer, batch, batch_size, total_time, total_loss) ⇒ BatchStats
Returns a new instance of BatchStats.
10 11 12 13 14 15 16 |
# File 'lib/coo-coo/trainer/batch_stats.rb', line 10 def initialize(trainer, batch, batch_size, total_time, total_loss) @trainer = trainer @batch = batch @batch_size = batch_size @total_time = total_time @total_loss = total_loss end |
Instance Attribute Details
#batch ⇒ Object (readonly)
Returns the value of attribute batch.
5 6 7 |
# File 'lib/coo-coo/trainer/batch_stats.rb', line 5 def batch @batch end |
#batch_size ⇒ Object (readonly)
Returns the value of attribute batch_size.
6 7 8 |
# File 'lib/coo-coo/trainer/batch_stats.rb', line 6 def batch_size @batch_size end |
#total_loss ⇒ Object (readonly)
Returns the value of attribute total_loss.
8 9 10 |
# File 'lib/coo-coo/trainer/batch_stats.rb', line 8 def total_loss @total_loss end |
#total_time ⇒ Object (readonly)
Returns the value of attribute total_time.
7 8 9 |
# File 'lib/coo-coo/trainer/batch_stats.rb', line 7 def total_time @total_time end |
#trainer ⇒ Object (readonly)
Returns the value of attribute trainer.
4 5 6 |
# File 'lib/coo-coo/trainer/batch_stats.rb', line 4 def trainer @trainer end |