Torch
from torch import nn
import torch
class LogisticRegression(nn.Module):
"""LogisticRegression with torch"""
def __init__(self):
super().__init__()
self.fc1 = nn.Linear(in_features=14, out_features=1)
self.sigmoid1 = nn.Sigmoid()
def forward(self, x):
"""Forward pass."""
out = self.fc1(x)
out = self.sigmoid1(out)
return out
torch_model = LogisticRegression()List of supported torch operators
List of supported activations
Last updated
Was this helpful?