craiyon logo

Neon blue isometric circuit board with a glowing brain icon, connected data cubes, and intricate lines, symbolizing AI.

Neon blue isometric circuit board with a glowing brain icon, connected data cubes, and intricate lines, symbolizing AI.

def __init__(self, grid_size=5): super(PureCNN_CIFAR10, self).__init__() # CIFAR-10 has 3 input channels (RGB) self.conv1 = nn.Conv2d(3, 8, kernel_size=3, padding=(0,0)) self.conv2 = nn.Conv2d(8, 16, kernel_size=3, padding=(0,0)) self.conv3 = nn.Conv2d(16, 32, kernel_size=3, padding=(0,0)) self.name = f"Conv & KAN CIFAR-10 (gs = {grid_size})" # Add batch normalization for stability self.bn1 = nn.BatchNorm2d(8) self.bn2 = nn.BatchNorm2d(16) self.bn3 = nn.BatchNorm2d(32) # Max pooling layer self.maxpool = nn.MaxPool2d(kernel_size=2) # Flatten layer self.flatten = nn.Flatten() # Layer normalization before KAN self.norm = nn.LayerNorm(128) self.fc = nn.Linear(128, 10) # Output classes (10 for CIFAR-10) See more