summaryrefslogtreecommitdiffstats
path: root/trainer_old
diff options
context:
space:
mode:
Diffstat (limited to 'trainer_old')
-rw-r--r--trainer_old/base.py14
1 files changed, 4 insertions, 10 deletions
diff --git a/trainer_old/base.py b/trainer_old/base.py
index 1f85e71..5903d96 100644
--- a/trainer_old/base.py
+++ b/trainer_old/base.py
@@ -174,19 +174,13 @@ class TrainingStrategy():
174 174
175 @contextmanager 175 @contextmanager
176 def on_train(self, epoch: int): 176 def on_train(self, epoch: int):
177 try: 177 self.tokenizer.train()
178 self.tokenizer.train() 178 yield
179 yield
180 finally:
181 pass
182 179
183 @contextmanager 180 @contextmanager
184 def on_eval(self): 181 def on_eval(self):
185 try: 182 self.tokenizer.eval()
186 self.tokenizer.eval() 183 yield
187 yield
188 finally:
189 pass
190 184
191 def on_before_optimize(self, epoch: int): 185 def on_before_optimize(self, epoch: int):
192 ... 186 ...