0% found this document useful (0 votes)
4 views

Code Analysis

Uploaded by

mathandass5555
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Code Analysis

Uploaded by

mathandass5555
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Detailed Explanation of the Code from practice_1.

ipynb

5. Training a CNN Model on Fashion MNIST

----------------------------------------

The code demonstrates the use of TensorFlow and Keras to train a CNN model on the Fashion MNIST dat

Data Loading and Preprocessing:

- The dataset contains 60,000 training and 10,000 testing grayscale images.

- Pixel values are normalized to [0, 1] by dividing by 255.0.

- The images are reshaped to (28, 28, 1) to include the channel dimension.

Model Architecture:

- A Conv2D layer with 8 filters, 3x3 kernel, stride of 2, and ReLU activation.

- A Flatten layer converts the 2D feature map into a 1D vector.

- A Dense layer with 10 outputs for the 10 clothing categories.

Compilation and Training:

- Adam optimizer and Sparse Categorical Crossentropy loss function are used.

- The model is trained for 10 epochs.

Evaluation:

- The test accuracy is printed after evaluating the model on test data.

6. Working with the CIFAR-10 Dataset

------------------------------------

The CIFAR-10 dataset consists of 60,000 32x32 color images in 10 classes. The code demonstrates how t
IMDB Dataset for Text Classification

------------------------------------

The IMDB dataset is used for binary sentiment analysis. The reviews are padded to ensure consistent inpu

You might also like