Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Pytorch_NNdemo001
from torch import nn, optim
import torch.nn.functional as F
n_input = 784
n_hidden = 200
n_output = 10
model = nn.Sequential(nn.Linear(n_input, 128),
nn.ReLU(),
nn.Linear(128, 64),
nn.ReLU(),
nn.Linear(64,10),
nn.LogSoftmax(dim=1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.