Skip to content
Merged
Prev Previous commit
Next Next commit
Merge branch 'main' into feat/lycoris-conv1x1-support
  • Loading branch information
githubnemo authored May 28, 2025
commit fd21ef80223d032a7ec9a4055f1d2a0e3977df2a
21 changes: 21 additions & 0 deletions tests/test_custom_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,27 @@ def forward(self, X):
return X


class ModelConv2DGroups(nn.Module):
def __init__(self):
super().__init__()
self.conv2d = nn.Conv2d(5, 5, 3, groups=5)
self.relu = nn.ReLU()
self.flat = nn.Flatten()
self.lin0 = nn.Linear(5, 2)
self.sm = nn.LogSoftmax(dim=-1)
self.dtype = torch.float

def forward(self, X):
X = X.to(self.dtype)
X = X.reshape(-1, 5, 3, 3)
X = self.conv2d(X)
X = self.relu(X)
X = self.flat(X)
X = self.lin0(X)
X = self.sm(X)
return X


class ModelConv1D(nn.Module):
def __init__(self):
super().__init__()
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.