gym-examples 3.0.403__py3-none-any.whl → 3.0.405__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.
gym_examples/__init__.py CHANGED
@@ -5,4 +5,4 @@ register(
5
5
  entry_point="gym_examples.envs:WSNRoutingEnv",
6
6
  )
7
7
 
8
- __version__ = "3.0.403"
8
+ __version__ = "3.0.405"
@@ -55,15 +55,14 @@ max_reward = 1 # maximum reward value when the sensors sent data to the base sta
55
55
  # net = net.double() # Convert the weights to Double
56
56
 
57
57
  class ScalarAttentionModel(nn.Module):
58
- def __init__(self, input_dim):
58
+ def __init__(self, input_dim=4, output_dim=1):
59
59
  super(ScalarAttentionModel, self).__init__()
60
60
  # Initialize GaussianAdaptiveAttention
61
61
  self.ga_attention = GaussianAdaptiveAttention(
62
62
  num_heads=1, # Single head for simplicity
63
- num_gaussians=4, # Corresponds to your input length
64
- attention_axis=0, # Attention along the first axis
63
+ num_gaussians=input_dim, # Corresponds to your input length
65
64
  )
66
- self.output_layer = nn.Linear(input_dim, 1) # Map to scalar output
65
+ self.output_layer = nn.Linear(input_dim, output_dim) # Map to scalar output
67
66
 
68
67
  def forward(self, x):
69
68
  # Apply GaussianAdaptiveAttention
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gym-examples
3
- Version: 3.0.403
3
+ Version: 3.0.405
4
4
  Summary: A custom environment for multi-agent reinforcement learning focused on WSN routing.
5
5
  Home-page: https://github.com/gedji/CODES.git
6
6
  Author: Georges Djimefo
@@ -0,0 +1,7 @@
1
+ gym_examples/__init__.py,sha256=40E0HKdRnFZJb4sIr2nsfLR9rwnswY_7xpJvqB8eSUU,166
2
+ gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
3
+ gym_examples/envs/wsn_env.py,sha256=GAZo9ChQOp8kvcBupQ-2iiiQPRvcFyTWsfcepiEdSes,27309
4
+ gym_examples-3.0.405.dist-info/METADATA,sha256=RqAZngR0abiyohGZKSfBaWLCGIz-epMXw7PnYEnv_2g,412
5
+ gym_examples-3.0.405.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
6
+ gym_examples-3.0.405.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
7
+ gym_examples-3.0.405.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- gym_examples/__init__.py,sha256=uZ4mM6NSjwxePQXM2-RWonNMiovwpzWrHPeC3sFQh2E,166
2
- gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
3
- gym_examples/envs/wsn_env.py,sha256=hLM8UtyVrLn-dm_8ZazOjR_iuBk9mLxzCwRRsIbopWs,27341
4
- gym_examples-3.0.403.dist-info/METADATA,sha256=2_y7Mzr61A562vvryVnwYkvu6QREaA63Il4UdBG-RGc,412
5
- gym_examples-3.0.403.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
6
- gym_examples-3.0.403.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
7
- gym_examples-3.0.403.dist-info/RECORD,,