Sparsely Connected Custom model-The Simplest Way
Last Updated on July 20, 2023 by Editorial Team
Author(s): Akula Hemanth Kumar
Originally published on Towards AI.
Making computer vision easy with Monk, low code Deep Learning tool and a unified wrapper for Computer Vision.
GoogLeNet architecture has sparsely connected layers instead of densely connected layers.
Have you ever tried to build a Sparsely connected custom model? If yes, I will show you the simplest way to do it. If no, you are in the right place to get started.
Table of Contents
- Installation
- Load Data
- Create and debug network
- Train
Installation
Install Monk, a low code Deep Learning tool and a unified wrapper for Computer Vision.
git clone https://github.com/Tessellate-Imaging/monk_v1.git#Select the requirements file as per OS and CUDA versioncd monk_v1/installation/Linux && pip install -r requirements_cu9.txt
Load Data
Here we are using Stanford Dogs classification dataset.
! wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1b4tC_Pl1O80of7U-PJ7VExmszzSX3ZEM' -O- U+007C sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1b4tC_Pl1O80of7U-PJ7VExmszzSX3ZEM" -O dogs-species-dataset.zip && rm -rf /tmp/cookies.txt
Create and debug network
Debug Custom Model
gtf.debug_custom_model_design(network);
Here we will make a subnetwork with three branches and append it to the base network.
Debug Custom Model
gtf.debug_custom_model_design(network);
Debug
gtf.debug_custom_model_design(network);
We will add another subnetwork with three branches and append to base network.
Debug Custom Model
gtf.debug_custom_model_design(network);
Debug Custom Model
gtf.debug_custom_model_design(network);
Visualize with Netron
Letβs visualize the model with Netron.
Train
Set Epochs, Optimizer, losses and learning rate schedulers.
You can find the complete jupyter notebook on Github.
If you have any questions, you can reach Abhishek and Akash. Feel free to reach out to them.
I am extremely passionate about computer vision and deep learning in general. I am an open-source contributor to Monk Libraries.
You can also see my other writings at:
Akula Hemanth Kumar – Medium
Read writing from Akula Hemanth Kumar on Medium. Computer vision enthusiast. Every day, Akula Hemanth Kumar andβ¦
medium.com
Join thousands of data leaders on the AI newsletter. Join over 80,000 subscribers and keep up to date with the latest developments in AI. From research to projects and ideas. If you are building an AI startup, an AI-related product, or a service, we invite you to consider becoming aΒ sponsor.
Published via Towards AI