Delete SplitOnOffLayer.py

This commit is contained in:
David Rotermund 2024-07-10 16:01:51 +02:00 committed by GitHub
parent 533f54f212
commit b5d0f35196
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,23 +0,0 @@
import torch
class SplitOnOffLayer(torch.nn.Module):
def __init__(
self,
) -> None:
super().__init__()
####################################################################
# Forward #
####################################################################
def forward(self, input: torch.Tensor) -> torch.Tensor:
assert input.ndim == 4
temp = input - 0.5
temp_a = torch.nn.functional.relu(temp)
temp_b = torch.nn.functional.relu(-temp)
output = torch.cat((temp_a, temp_b), dim=1)
return output