Create models/action_agent.py
Browse files- models/action_agent.py +15 -0
models/action_agent.py
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import torch
|
2 |
+
import torch.nn as nn
|
3 |
+
|
4 |
+
class ActionAgent(nn.Module):
|
5 |
+
def __init__(self, config):
|
6 |
+
super(ActionAgent, self).__init__()
|
7 |
+
self.fc_layers = nn.Sequential(
|
8 |
+
nn.Linear(config["decision_output_size"], 128),
|
9 |
+
nn.ReLU(),
|
10 |
+
nn.Linear(128, config["action_output_size"])
|
11 |
+
)
|
12 |
+
|
13 |
+
def forward(self, x):
|
14 |
+
x = self.fc_layers(x)
|
15 |
+
return x
|