rxnn 0.1.8__py3-none-any.whl → 0.1.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
rxnn/training/base.py
CHANGED
@@ -141,7 +141,8 @@ class BaseTrainer(ABC):
|
|
141
141
|
callback.on_batch_start(self.model, batch_idx, batch)
|
142
142
|
if self.get_batch_size(batch) == batch_size:
|
143
143
|
loss = self.train_step(batch, batch_idx)
|
144
|
-
|
144
|
+
orig_loss = loss.item()
|
145
|
+
self.accumulated_loss += orig_loss
|
145
146
|
loss = loss / self.gradient_accumulation_steps
|
146
147
|
|
147
148
|
if self.use_amp:
|
@@ -192,7 +193,7 @@ class BaseTrainer(ABC):
|
|
192
193
|
epoch * len(dataloader) + batch_idx)
|
193
194
|
|
194
195
|
for callback in self.callbacks:
|
195
|
-
should_stop = callback.on_batch_end(self.model, batch_idx,
|
196
|
+
should_stop = callback.on_batch_end(self.model, batch_idx, orig_loss, batch)
|
196
197
|
if should_stop:
|
197
198
|
self.is_running = False
|
198
199
|
|
@@ -7,7 +7,7 @@ rxnn/memory/stm.py,sha256=EsD8slSP4_9dLuq6aFPDmuFe8PWilxh90so5Z3nm-ig,2057
|
|
7
7
|
rxnn/rxt/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
8
|
rxnn/rxt/models.py,sha256=INTFeNcqzAsjyWhNtbBHL4Tx7tYDsaQHgm72tf6u20M,6918
|
9
9
|
rxnn/training/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
|
-
rxnn/training/base.py,sha256=
|
10
|
+
rxnn/training/base.py,sha256=UOFFA1Ai6g8l2iOwdYuWrEJPkioej8DOU2YsYN4K9QI,11071
|
11
11
|
rxnn/training/bml.py,sha256=pyK6aRLpXlPuLge6CQ9PD64Un57yUgbOpu8lUfTdV9k,14575
|
12
12
|
rxnn/training/callbacks.py,sha256=IyVJAJ0ggJmfIWBZnpzV9U08URYCeWIStK_wbx7m3pg,21090
|
13
13
|
rxnn/training/dataset.py,sha256=vQ5mDF3bA0HXya474n4D4iL8Mn3AEpJukgzFNVkxjGU,5106
|
@@ -23,7 +23,7 @@ rxnn/transformers/moe.py,sha256=JQ5QSX4FS7S-fqB7-s1ZmJbPpOeD_Injn8o4vo7wGQE,4936
|
|
23
23
|
rxnn/transformers/positional.py,sha256=2l38RS0Dini3f6Z3LUHr3XwWzg1UK7fO2C6wazWDAYU,4292
|
24
24
|
rxnn/transformers/sampler.py,sha256=wSz_1wNloqtuiix5w2Mcsj5NhaO9QlY0j__TVG7wJnM,3938
|
25
25
|
rxnn/utils.py,sha256=d5U8i5ukovgDyqiycc2AoxObTz_eF_bgo2MKvdtJ98s,467
|
26
|
-
rxnn-0.1.
|
27
|
-
rxnn-0.1.
|
28
|
-
rxnn-0.1.
|
29
|
-
rxnn-0.1.
|
26
|
+
rxnn-0.1.9.dist-info/LICENSE,sha256=C8coDFIUYuOcke4JLPwTqahQUCyXyGq6WOaigOkx8tY,11275
|
27
|
+
rxnn-0.1.9.dist-info/METADATA,sha256=AraTWJtxAkj6Zx2UUB2YwfFWSk-WwZ5tgcYhWkLZEEM,14628
|
28
|
+
rxnn-0.1.9.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
29
|
+
rxnn-0.1.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|