Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import torch
- import torch.nn as nn
- class LogReg(nn.Module):
- def __init__(self, in_dim):
- super(LogReg, self).__init__()
- self.linear = nn.Linear(in_dim, 1)
- self.sigmoid = nn.Sigmoid()
- def forward(self, x):
- y_pred = self.sigmoid(self.linear(x))
- return y_pred
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement