This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch.optim as optim | |
net = Net() | |
criterion = nn.MSELoss() | |
optimizer = optim.SGD(net.parameters(), lr=0.001, momentum=0.0,weight_decay=0.000) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch.nn as nn | |
import torch.nn.functional as F | |
class Net(nn.Module): | |
def __init__(self): | |
super().__init__() | |
self.fc1 = nn.Linear(10, 100) | |
self.fc2 = nn.Linear(100, 2) |