Skip to content

Section 6: Convolutional Neural Network

Create data loader-

Define CNN model architecture -

  • Implementation - nbviewer

    Alternative link

    Alternative link - source repository

    Update: add relu in forward method

    def forward(self, x):
        x = self.conv_pool_01(x)
        x = self.conv_pool_02(x)
        x = self.Flatten(x)
        x = self.FC_01(x)
        x = F.relu(x)
        x = self.FC_02(x)
        x = F.relu(x)    
        x = self.FC_03(x)
        return x
    
  • Data - Image_data

Train CNN model -

Evaluate CNN model -

Predict using CNN model -

Back to top