Advertisement
Guest User

Untitled

a guest
May 19th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. import torch
  2. import torch.nn as nn
  3.  
  4. class LogReg(nn.Module):
  5. def __init__(self, in_dim):
  6. super(LogReg, self).__init__()
  7. self.linear = nn.Linear(in_dim, 1)
  8. self.sigmoid = nn.Sigmoid()
  9.  
  10. def forward(self, x):
  11. y_pred = self.sigmoid(self.linear(x))
  12. return y_pred
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement