Giter Club home page Giter Club logo

megarajan-s / convolution-neural-network Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 538 KB

A CNN is a kind of network architecture for deep learning algorithms and is specifically used for image recognition and tasks that involve the processing of pixel data. This repository contains the code for CNN with a categorical classification dataset.

Python 100.00%
activation-functions adam-optimizer artificial-intelligence artificial-neural-networks convolutional-layers convolutional-neural-networks crossentropyloss dataset fully-connected-network loss-functions output pooling-layers python python3 torch torchvision

convolution-neural-network's Introduction

CONVOLUTION-NEURAL-NETWORK

A CNN is a kind of network architecture for deep learning algorithms and is specifically used for image recognition and tasks that involve the processing of pixel data. This repository contains the code for CNN with a categorical classification dataset.

The three types of layers usually present in a Convolutional Network are:

Convolutional Layers Pooling Layers Fully Connected Layers

The Convolution Layer: Convolution is an orderly procedure where two sources of information are intertwined; it’s an operation that changes a function into something else. Convolutions have been used for a long time typically in image processing to blur and sharpen images, but also to perform other operations.

The Pooling Layer: Pooling layers are used to reduce the dimensions of the feature maps. Thus, it reduces the number of parameters to learn and the amount of computation performed in the network.

The Fully Connected Layer: Fully-connected layers, also known as linear layers, connect every input neuron to every output neuron and are commonly used in neural networks. If you want to know more about filly connected layer check my artificail neural network repositorie.

About the Dataset: This is a categorical classification dataset. Which has a different categories of data. This dataset is from pytorch CIFAR-10. The CIFAR-10 dataset contains 60,000 32x32 color images, and each image is represented as a 3-D tensor. Each image will be a (32,32,3) tensor, where the dimensions are 32 (height) x 32 (weight) x 3 (R-G-B color channels). There are different types of classes are present. They are ['airplane', 'automobile', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck'].

This convolution neural network has Cross entropy loss function which is best suitable for the categorical dataset. This neural network has Adam optimizer which is the more suitable for this dataset.

Output: There are two output in this repositorie. In the first one the number of epochs used are 200 with a learing rate of 0.0001. The output has training loss of 0.02 and the testing accuracy of 72. The sample prediction by the neural network is in OUTPUT 1.txt. The sample data set is in Figure_1.png.The second one has the epochs of 500 and the learing rate of 0.00001.the output has training loss of 0.004 the test accuracy of 75. The sample prediction is in OUTPUT 2.txt. The sample prediction is in Figure_2.png.

Software used: Pycharm Community - 2023.1.4 cuda version - 12.2 torch - 2.0.1+cu118 torchaudio - 2.0.2 torchvision - 0.15.2+cu118 Jinja2 - 3.1.2 numpy - 1.25.0 matplotlib - 3.7.2

convolution-neural-network's People

Contributors

megarajan-s avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.