Create SimpleModel.py
Browse files- SimpleModel.py +11 -0
SimpleModel.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
import torch.nn as nn
|
| 3 |
+
import numpy as np
|
| 4 |
+
|
| 5 |
+
class SimpleModel(nn.Module):
|
| 6 |
+
def __init__(self):
|
| 7 |
+
super(SimpleModel, self).__init__()
|
| 8 |
+
self.linear = nn.Linear(1, 1)
|
| 9 |
+
|
| 10 |
+
def forward(self, x):
|
| 11 |
+
return self.linear(x)
|