text: # -*- coding: utf-8 -*-
  """Understanding of CNN First Tutorial.ipynb
  
  Automatically generated by Colaboratory.
  
  Original file is located at
      https://colab.research.google.com/drive/101ydJDIqCQwsNBmYSTW90jL9p8pjkPqE
  """
  
  import tensorflow as tf
  import matplotlib.pyplot as plt
  import numpy as np
  from numpy import asarray
  import cv2
  
  img = cv2.imread('lena.png', cv2.IMREAD_GRAYSCALE)
  img = img
  plt.imshow(img, cmap='gray')
  plt.show()
  
  img.shape
  
  """Keras needs batch of image in 4 inputs shape so let's convert this image into that"""
  
  img_batch = img.reshape(1, img.shape[0], img.shape[1], 1)
  
  img_batch.shape
  
  # 1 shows number of images, 512 shows rows, 512 shows columns, 1 shows grayscale channel
  
  inputs = tf.keras.Input(shape=(512,512,1))
  x = tf.keras.layers.Convolution2D(filters=10, kernel_size= (15*15), padding='valid', strides=1)(inputs)
  model = tf.keras.Model(inputs = inputs, outputs= x)
  model.summary()
  
  conv_image = model.predict(img_batch)
  
  conv_image.shape
  
  