From 71d233cc2e248fa8182b36799e691299832adeb0 Mon Sep 17 00:00:00 2001 From: Deepak Sahu <38010046+LunaticMaestro@users.noreply.github.com> Date: Thu, 26 Dec 2024 18:38:05 +0530 Subject: [PATCH] typo in model structure - the final model structure uses 3 channel input. - no data transformation was done to transform input images from 3 channel (RGB) to 1 channel (Grayscale). --- beginner_source/introyt/introyt1_tutorial.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beginner_source/introyt/introyt1_tutorial.py b/beginner_source/introyt/introyt1_tutorial.py index 7467507070..46d06a4703 100644 --- a/beginner_source/introyt/introyt1_tutorial.py +++ b/beginner_source/introyt/introyt1_tutorial.py @@ -176,9 +176,9 @@ class LeNet(nn.Module): def __init__(self): super(LeNet, self).__init__() - # 1 input image channel (black & white), 6 output channels, 5x5 square convolution + # 3 input image channel (RGB image), 6 output channels, 5x5 square convolution # kernel - self.conv1 = nn.Conv2d(1, 6, 5) + self.conv1 = nn.Conv2d(3, 6, 5) self.conv2 = nn.Conv2d(6, 16, 5) # an affine operation: y = Wx + b self.fc1 = nn.Linear(16 * 5 * 5, 120) # 5*5 from image dimension