First working version

This commit is contained in:
City
2023-07-30 04:24:18 +02:00
parent ce0d423bfa
commit 8e6fe01208
6 changed files with 259 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
import torch
import torch.nn as nn
import numpy as np
class Interposer(nn.Module):
def __init__(self):
super().__init__()
# it looks like a spaceship if you squint :P
module_list = [
#############)
#############)
#||#
#||#
nn.Conv2d(4, 32, kernel_size=5, padding=2),
nn.ReLU(),
nn.Conv2d(32, 128, kernel_size=7, padding=3),
nn.ReLU(),
nn.Conv2d(128, 32, kernel_size=7, padding=3),
nn.ReLU(),
nn.Conv2d(32, 4, kernel_size=5, padding=2),
#||#
#||#
#############)
#############)
]
self.sequential = nn.Sequential(*module_list)
def forward(self, x: torch.Tensor) -> torch.Tensor:
return self.sequential(x)