Update file trainer.py
Browse files- trainer.py +3 -2
trainer.py
CHANGED
|
@@ -15,8 +15,9 @@ class Trainer:
|
|
| 15 |
args = {'epoch': self.epoch, 'batch': self.batch, 'loss': loss}
|
| 16 |
self.wandb(args)
|
| 17 |
|
| 18 |
-
if self.
|
| 19 |
-
|
|
|
|
| 20 |
|
| 21 |
|
| 22 |
def train(self, batches):
|
|
|
|
| 15 |
args = {'epoch': self.epoch, 'batch': self.batch, 'loss': loss}
|
| 16 |
self.wandb(args)
|
| 17 |
|
| 18 |
+
if self.inference.frequency != 0:
|
| 19 |
+
if self.batch % self.inference.frequency == 0:
|
| 20 |
+
print(f'{self.model.generate_text(self.inference.seed_text, self.inference.n_predict)}')
|
| 21 |
|
| 22 |
|
| 23 |
def train(self, batches):
|