Difficulty: beginner
Estimated Time: 10 minutes

Convolutional layers are a type that is often used in the Computer Vision tasks. They take advantage of the pixel surroundings instead of treating the images as vectors.

In this scenario, you will add two convolutional layers to the previously created network.


You've completed MNIST Dataset Convolution scenario.

You've added the Convolutional layers to achieve better accuracy for the MNIST dataset classification task.

MNIST Dataset Convolution

Step 1 of 5

Load Dataset

In this scenario, you will be adding two convolutional layers to the neural network, you've built previously. To start the lab, open the neural_network.py file and follow the instructions. We will be classifying the MNIST dataset, so the first thing we need to get is the dataset itself.

mnist = input_data.read_data_sets("MNIST_data/", one_hot=True)

Then the placeholders are defined.

training_data = tf.placeholder(tf.float32, [None, image_size*image_size]) labels = tf.placeholder(tf.float32, [None, labels_size])

The network architecture will look like in the image below. You will implement the convolutional and max-pooling layers. The dense ones and the training process is already there.

Convolutional Neural Network

Task 1

The images read from the dataset are flattened. For the first convolution layer to work properly they should be reshaped into 2D. For this task you can use the tf.reshape function and apply it to the training_data.

This tab will not be visible to users and provides only information to help authors when creating content.

Creating Katacoda Scenarios

Thanks for creating Katacoda scenarios. This tab is designed to help you as an author have quick access the information you need when creating scenarios.

Here are some useful links to get you started.

Running Katacoda Workshops

If you are planning to use Katacoda for workshops, please contact [email protected] to arrange capacity.

Debugging Scenarios

Below is the response from any background scripts run or files uploaded. This stream can aid debugging scenarios.

If you still need assistance, please contact [email protected]