We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
image_shape
in_channels
1 parent 9ad01e4 commit f4e5591Copy full SHA for f4e5591
utils/models/christian_model.py
@@ -27,8 +27,8 @@ class ChristianModel(nn.Module):
27
28
Args
29
----
30
- in_channels : int
31
- Number of input channels.
+ image_shape : tuple(int, int, int)
+ Shape of the input image (C, H, W).
32
num_classes : int
33
Number of classes in the dataset.
34
@@ -49,10 +49,12 @@ class ChristianModel(nn.Module):
49
FC Output Shape: (5, num_classes)
50
"""
51
52
- def __init__(self, in_channels, num_classes):
+ def __init__(self, image_shape, num_classes):
53
super().__init__()
54
55
- self.cnn1 = CNNBlock(in_channels, 50)
+ C, *_ = image_shape
56
+
57
+ self.cnn1 = CNNBlock(C, 50)
58
self.cnn2 = CNNBlock(50, 100)
59
60
self.fc1 = nn.Linear(100 * 4 * 4, num_classes)
0 commit comments