Aditya Chatterjee's Blog, page 140

December 3, 2021

Filter and Channel Pruning

In this article, we will cover the idea of Pruning which is an important optimization technique for CNN models. It reduces the size of models as well as the Inference time. We dive into two main types of Pruning that is Channel Pruning and Filter Pruning.

Table of Contents:

Introduction to Pruning in CNNFilter PruningChannel Pruning

Prerequisites:

Idea of Pruning in Machine Learning (ML)Types of Neural Network optimizationsIntroduction to Pruning in CNN

Convolutional neural networks (CNN...

 •  0 comments  •  flag
Share on Twitter
Published on December 03, 2021 13:47

Bellman's Optimality Equation

In this article, we will be walking through the concept behind Bellman's Optimality equation, and how it is used in the case of Reinforcement Learning.

V( s ) = a max ( R(s,a) )+γV(s'))−−> Bellman's equation for deterministic environment

Bellman’s optimality equation:

V * (s)= ∑ a π(a|s) . ∑ s' P(s'|a)[ E(r|s,as')+γ V * (s') ]

Bellman’s equation is one amongst other very important eq...

 •  0 comments  •  flag
Share on Twitter
Published on December 03, 2021 08:32

Fermat’s Last Theorem

In this article, we will be talking about Fermat's Last Theorem , also called as Fermat's Great theorem. Stated by Pierre de Fermat in around 1637 in a margin of his copy of Arithmetica. A Nightmare for Mathematicians to prove. This theorem resisted proof for around 358 years until a successful proof was released by Andrew Wiles in 1994.

Table of contents:

Statement of Fermat’s Last TheoremProof for n = 4AlgorithmConclusionStatement of Fermat’s Last Theorem

It states that there are no nat...

 •  0 comments  •  flag
Share on Twitter
Published on December 03, 2021 08:23

December 2, 2021

Height and Width in CSS

Height and Width in CSS

In this article, we have explored Height and Width in CSS in depth along with examples of how to use it in webpages and setting max-width and max-height.

Table of contents:

Height and Width in CSSValues of Height and Width in CSSSetting Height and Width of a ImageSetting max-width and min-width of an ElementSetting max-height and min-height of an ElementTime to Test Yourself With a ExerciseHeight and Width in CSS

Height and Width are properties in CSS which are used to set the height and...

 •  0 comments  •  flag
Share on Twitter
Published on December 02, 2021 20:13

Ways to pause a Python Program

In this article, we have explored different techniques to pause the execution of a Python Program for a specific time. There are 9 such techniques including os.pause, asyncio and much more.

Table of contents:

Using the sleep methodUse input functionUsing the os.pause methodWindows mscvrtAwaiting Correct user InputUsing the python interpreter functionalityUsing python asyncioEvent.wait() methodTimer method from threading

Python is one of the most popular programming languages. Python is...

 •  0 comments  •  flag
Share on Twitter
Published on December 02, 2021 02:38

December 1, 2021

Closest Pair of Points

In this article, we have explored different algorithms using which we can find the Closest Pair of Points in a given set of N points efficiently in O(N logN) time. This involves the idea of Divide and Conquer.

Table of Contents:IntroductionBrute ForceDivide and ConquerOptimised Divide and ConquerOverviewIntroduction

Finding the closest point to another in a given graph is a simple sounding problem which can get quite complex in trying to solve efficiently, in this article we will discuss...

 •  0 comments  •  flag
Share on Twitter
Published on December 01, 2021 02:10

November 30, 2021

Number of Integral points inside a rectangle

In this article, we have explored an insightful approach/ algorithm to find the number of interior integral points of a rectangle. This is an important concept in the field of computational geometry.

[image error]

TABLE OF CONTENTSProblem Statement DefinitionIntuitionPick's TheoremMathematical FormulationSolution AnalysisArea of a randomly-oriented rectangleIntegral points on a line segmentNaive approachOptimized approachAlgorithmImplementationPythonC Time-Complexity analysisSpac...
 •  0 comments  •  flag
Share on Twitter
Published on November 30, 2021 14:13

Oriented area of a triangle

In this article, we discuss how to find the area of an oriented Polygon using the shoelace algorithm and as an example we find the area of an oriented triangle.

Table of contents:

Introduction to Oriented TriangleSteps to find area of PolygonShoelace formulaOriented area of triangleImplementation in C++Time and Space Complexity Analysis

Prerequisite: Shoelace formula

Introduction to Oriented Triangle

Oriented triangles are just regular triangles but with some orientation and thus have ori...

 •  0 comments  •  flag
Share on Twitter
Published on November 30, 2021 05:55

November 29, 2021

Self Crossing Problem

This article delves into the illustrious Self Crossing problem and looks at how we can solve it. This can be solved efficiently using Computational Geometry ideas.

Table of ContentExamining the Problem StatementSolving the ProblemThe ImplementationConclusionExamining the Problem Statement

Given an array of integers, where each integer represents a distance. You start at coordinate (0,0) then for the length of the array. first, move array[0] meters to the north, then array[1] meters to th...

 •  0 comments  •  flag
Share on Twitter
Published on November 29, 2021 23:28

November 28, 2021

Select a random node from Linked list

In this article, we have presented two algorithms to select a random node from Linked list efficiently while maintaining uniform randomness.

Table of contents:

Introduction to Randomized AlgorithmsEfficient ApproachSecond Approach: Using auxillary arrayIntroduction to Randomized Algorithms

In Mathematics , we all have studied about the concept of random events,experiments and the probablities govering them. For solving the above problem we generally use the concept of Probability and Random...

 •  0 comments  •  flag
Share on Twitter
Published on November 28, 2021 14:47