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 +1 -1
- gym_examples/envs/wsn_env.py +3 -4
- {gym_examples-3.0.403.dist-info → gym_examples-3.0.405.dist-info}/METADATA +1 -1
- gym_examples-3.0.405.dist-info/RECORD +7 -0
- gym_examples-3.0.403.dist-info/RECORD +0 -7
- {gym_examples-3.0.403.dist-info → gym_examples-3.0.405.dist-info}/WHEEL +0 -0
- {gym_examples-3.0.403.dist-info → gym_examples-3.0.405.dist-info}/top_level.txt +0 -0
gym_examples/__init__.py
CHANGED
gym_examples/envs/wsn_env.py
CHANGED
@@ -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=
|
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,
|
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
|
@@ -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,,
|
File without changes
|
File without changes
|