Spaces:
Runtime error
Runtime error
Commit ·
fca1bbb
1
Parent(s): 16e1dde
Commented train.py
Browse files
train.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
import torch
|
| 2 |
import torch.nn as nn
|
| 3 |
import torch.nn.functional as F
|
|
@@ -86,4 +87,6 @@ def train(model):
|
|
| 86 |
loss.backward()
|
| 87 |
optimizer.step()
|
| 88 |
|
| 89 |
-
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
import torch
|
| 3 |
import torch.nn as nn
|
| 4 |
import torch.nn.functional as F
|
|
|
|
| 87 |
loss.backward()
|
| 88 |
optimizer.step()
|
| 89 |
|
| 90 |
+
# SAVING MODEL
|
| 91 |
+
torch.save(model_adam.state_dict(), "model_mnist.pth")
|
| 92 |
+
"""
|