λ
home posts study uses projects

Convolutional Neural Network

Jul 18, 2024

machine-learning

Neural Network type used primarily for image or video data. It uses an Image Kernel that convolves / strides across the input. Each value in the kernel is a weight in the neural network.

CNNs break down the input into smaller bits, instead of processing the entire image at once. These smaller bits are called features and the process of finding the exact kernels that detect those features is called feature extraction.

Example

A convolutional layer is configured by setting the kernel amount, size and stride.

  # Example with Tensorflow & Keras
  filters = 32
  size = (3, 3)
  input_shape = (226, 226, 3) # 226x226 RGB image
  keras.layers.Conv2D(filters, size, strides=2, input_shape=input_shape, activation=tf.nn.relu)

Increasing the stride will result in a smaller output of the layers

References

LλBS

All systems up and running

Commit c0daef5, deployed on Oct 01, 2024.