Create control_policy.py
Browse files- control_policy.py +12 -0
control_policy.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
import torch.nn as nn
|
| 3 |
+
|
| 4 |
+
class HumanoidControlPolicy(nn.Module):
|
| 5 |
+
def __init__(self):
|
| 6 |
+
super().__init__()
|
| 7 |
+
self.fc1 = nn.Linear(180, 90)
|
| 8 |
+
self.fc2 = nn.Linear(90, 45)
|
| 9 |
+
|
| 10 |
+
def forward(self, x):
|
| 11 |
+
x = torch.relu(self.fc1(x))
|
| 12 |
+
return self.fc2(x)
|