rxnn 0.2.64__py3-none-any.whl → 0.2.66__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/rxt/models.py CHANGED
@@ -268,6 +268,7 @@ class RxTAlphaMemoryAttention(nn.Module, PyTorchModelHubMixin, license="apache-2
268
268
  residual_per_slot_gate: bool = False,
269
269
  residual_init_gate: float = 0.0,
270
270
  use_dynamic_residual_gate: bool = False,
271
+ use_tanh_residual_gate: bool = False,
271
272
  debug_mode: bool = False,
272
273
  debug_interval: int = 10,
273
274
  **kwargs,
@@ -300,7 +301,7 @@ class RxTAlphaMemoryAttention(nn.Module, PyTorchModelHubMixin, license="apache-2
300
301
  stm, attention_layers, memory_norm_layers,
301
302
  use_gated_residual=use_gated_residual, per_slot_gate=residual_per_slot_gate,
302
303
  init_gate=residual_init_gate, use_dynamic_gate=use_dynamic_residual_gate,
303
- debug_mode=debug_mode, debug_interval=debug_interval,
304
+ use_tanh_gate=use_tanh_residual_gate, debug_mode=debug_mode, debug_interval=debug_interval,
304
305
  )
305
306
 
306
307
  def freeze(self):
rxnn/training/utils.py CHANGED
@@ -151,5 +151,9 @@ def get_gradient_norms(model: nn.Module):
151
151
  param_norm = p.grad.data.norm(2)
152
152
  total_norm += param_norm.item() ** 2
153
153
  total_norm = total_norm ** 0.5
154
- mean_norm = total_norm / len(grad_params)
154
+ params_len = len(grad_params)
155
+ if params_len != 0:
156
+ mean_norm = total_norm / params_len
157
+ else:
158
+ mean_norm = 0.0
155
159
  return total_norm, mean_norm
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: rxnn
3
- Version: 0.2.64
3
+ Version: 0.2.66
4
4
  Summary: RxNN: Reactive Neural Networks Platform
5
5
  License: Apache-2.0
6
6
  Keywords: deep-learning,ai,machine-learning
@@ -9,7 +9,7 @@ rxnn/memory/attention.py,sha256=lSniKrf_skiM1V1zbfmV84PbKoQ-t_fVcKfwNKW3_OY,3844
9
9
  rxnn/memory/norm.py,sha256=cVjjhCLqR5K6-321SP_ObG17y-ddlcTJeCTXvW4vpk0,6675
10
10
  rxnn/memory/stm.py,sha256=jv57gsH9XW19sLbxpRDqsp1yfsii_4Ef4Ncr_ztk-i4,3937
11
11
  rxnn/rxt/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
- rxnn/rxt/models.py,sha256=JrZQ78F4HGGklAy6mML4fbqdsMOcGSDRZpjhX55VXb8,15486
12
+ rxnn/rxt/models.py,sha256=M_0nEfSgr5Wyv-Ku4TCLpIs5VndUccjtIR0wU0DSVRo,15574
13
13
  rxnn/training/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  rxnn/training/base.py,sha256=CqaArEZYOdH64nmKfx28U3GI46TzO4oNkjf_hrF23Cw,11835
15
15
  rxnn/training/bml.py,sha256=hw6gLpLkGvqLzxIvBg4MvCc5r8cHpEm2RDyh7nH6CtE,16914
@@ -22,7 +22,7 @@ rxnn/training/reward.py,sha256=uiSsBXmjMw2yv-1Bssy3RTlpU6zP8ape3490Sl-aT0M,16144
22
22
  rxnn/training/rl.py,sha256=hWtExxY-_pAmTOGYxyCNounUbaGWvLDVltC4sRC7MN4,7175
23
23
  rxnn/training/scheduler.py,sha256=LcjU35mEwz2U5x3U6tLfeeYlBqMxbFSxYzJYuXkWbSY,1408
24
24
  rxnn/training/tokenizer.py,sha256=umaLByMBx_NMrQElA45HLm9gkuzyKWDTFaKVd-CjXl0,8344
25
- rxnn/training/utils.py,sha256=QMNkJPQBY04DX9WN7GHnI2EZTBbAzWkjt2W-798oUII,6129
25
+ rxnn/training/utils.py,sha256=ngDCm654NL3UsPy190Er4XPc9HI-OyEV6tDLMgEEvQc,6219
26
26
  rxnn/transformers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
27
  rxnn/transformers/attention.py,sha256=KRnKT6XUqAXElxV9y72mSpdTeiMgCKCCLqqxCFNTHmA,16372
28
28
  rxnn/transformers/ff.py,sha256=WDjO-H9XWInoWnUnxiseIH6Kx5GlHP0zGJygwhcb1gc,2589
@@ -33,7 +33,7 @@ rxnn/transformers/moe.py,sha256=j6jEx6Ip0zttlUZKKn82azxo95lkLZs-H2GLSMD88hY,5859
33
33
  rxnn/transformers/positional.py,sha256=1PjcJybUzeQlIKJI4tahAGZcYgCRCL0otxs7mpsNuzM,4410
34
34
  rxnn/transformers/sampler.py,sha256=t6iiQTdLQ0TakUWnnhKkb5DKF2F_9-thXHBydDF3fxg,17389
35
35
  rxnn/utils.py,sha256=ihb6OTyDtPiocB_lOvnq7eOkjjpCkgs8wxvXUBNQ7mM,996
36
- rxnn-0.2.64.dist-info/LICENSE,sha256=C8coDFIUYuOcke4JLPwTqahQUCyXyGq6WOaigOkx8tY,11275
37
- rxnn-0.2.64.dist-info/METADATA,sha256=QaDWd-8W0vs3povCgRAUXXSmTNN8gkEJ1dY6mA7n9kQ,25997
38
- rxnn-0.2.64.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
39
- rxnn-0.2.64.dist-info/RECORD,,
36
+ rxnn-0.2.66.dist-info/LICENSE,sha256=C8coDFIUYuOcke4JLPwTqahQUCyXyGq6WOaigOkx8tY,11275
37
+ rxnn-0.2.66.dist-info/METADATA,sha256=-vE86fZe4EISwHsFwRSx6K05iBGghFo20l0xS3OwpGs,25997
38
+ rxnn-0.2.66.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
39
+ rxnn-0.2.66.dist-info/RECORD,,
File without changes
File without changes