Update model.py
Browse files
model.py
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
import torch.nn as nn
|
| 3 |
+
|
| 4 |
+
class UncertaintyActionModel(nn.Module):
|
| 5 |
+
def init(self):
|
| 6 |
+
super().init()
|
| 7 |
+
self.fc = nn.Linear(3, 3) # confidence, risk, ambiguity
|
| 8 |
+
|
| 9 |
+
def forward(self, x):
|
| 10 |
+
return torch.softmax(self.fc(x), dim=-1)
|