fixed submit attempt #1 (failed to parse tuple type hint)

This commit is contained in:
Patrick 2024-07-21 17:35:34 +02:00
parent 39aa685e28
commit c4a93e9fae
3 changed files with 4 additions and 6 deletions

View File

@ -4,8 +4,7 @@ import torch.nn
class MyCNN(torch.nn.Module): class MyCNN(torch.nn.Module):
def __init__(self, def __init__(self,
input_channels: int, input_channels: int):
input_size: tuple[int, int]):
super().__init__() super().__init__()
self.layers = torch.nn.Sequential( self.layers = torch.nn.Sequential(
@ -51,4 +50,4 @@ class MyCNN(torch.nn.Module):
return str(self.layers) return str(self.layers)
model = MyCNN(input_channels=1, input_size=(100, 100)) model = MyCNN(input_channels=1)

View File

@ -4,8 +4,7 @@ import torch.nn
class MyCNN(torch.nn.Module): class MyCNN(torch.nn.Module):
def __init__(self, def __init__(self,
input_channels: int, input_channels: int):
input_size: tuple[int, int]):
super().__init__() super().__init__()
self.layers = torch.nn.Sequential( self.layers = torch.nn.Sequential(
@ -51,4 +50,4 @@ class MyCNN(torch.nn.Module):
return str(self.layers) return str(self.layers)
model = MyCNN(input_channels=1, input_size=(100, 100)) model = MyCNN(input_channels=1)