File size: 393 Bytes
6444a0c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | import torch
import torch.nn as nn
class FloodNet(nn.Module):
def __init__(self, input_dim):
super().__init__()
self.net = nn.Sequential(
nn.Linear(input_dim, 64),
nn.ReLU(),
nn.Linear(64, 32),
nn.ReLU(),
nn.Linear(32, 1),
nn.Sigmoid()
)
def forward(self, x):
return self.net(x)
|