# coding: utf-8
CNN Model # 1 - one layer
# import keras with other function library
The from keras. Models import Sequential, Model
The from keras. The layers import Conv2D
The from keras. Utils import np_utils
# import libraries needed for display SVG
The from IPython. Display the import SVG
The from keras. Utils. Vis_utils import model_to_dot
# if Windows environment with the following code
The import OS
OS. Environ (" PATH ") +=OS. Pathsep + 'D: \ python \ Scripts \ Graphviz/bin'
Make convolution of the neural network model #
The model=Sequential ()
# zero padding
Model. The add (Conv2D (filters=3, kernel_size=(3, 3), input_shape=(6,6,1),
Padding='same', the name='Conv2D_1'))
SVG (model_to_dot (model, show_shapes=True). The create (prog='dot', the format='SVG'))
Run after the output of the knot below: