Aditya Chatterjee's Blog, page 176
March 4, 2021
SAME and VALID padding
SAME and VALID padding are two common types of padding using in CNN (Convolution Neural Network) models. These padding convention types are mainly, used in TensorFlow.
The general meaning of SAME and VALID padding are:
SAME: Expects padding to be such that the input and output is of same size (provided stride=1) (pad value = kernel size)VALID: Padding value is set to 0Note: SAME padding is different in different frameworks. We have explained the meaning/ calculation of SAME padding in Keras ...
Create and Delete Folder in C++
Generally, we just use a right click to create or delete a folder in our windows OS! But there are other ways also to do the same task. One of the very common way is to use command prompt (i.e., cmd).
Creating FolderSo first we will see how we create a folder using cmd. For this open a command prompt, navigate to the folder where you want to create a new folder using cd. Then use command mkdir followed by the name of the folder you want to create. After that you can simply use command dir to ch...
March 3, 2021
MongoDB CRUD operations with Python
In this article, we'll be discussing on MongoDB CRUD operations with Python. Initially we'll start with the introduction on the article. Secondly we'll discuss on the prerequisites for the readers to follow the further flow of the article. In later sections we'll discuss the main script that performs the CRUD Operation on MongoDB through Pythonic way using a Object Document Mapper(ODM). We'll also implement an API using Flask Framework. At last we conclude with the output for same from Postman.
...Xception: Deep Learning with Depth-wise Separable Convolutions
Xception is a deep convolutional neural network architecture that involves Depthwise Separable Convolutions. This network was introduced Francois Chollet who works at Google, Inc. (Fun-Fact: He is the creator of keras).
Xception is also known as “extreme” version of an Inception module. Hence, let us look at the Inception module before delving into Xception.
Inception Network
An inception network is a deep neural network (DNN) with a design that consists of repeating modules referred to as incep...
Knight’s Tour Problem
The Knight's Tour Problem is one of the famous problem in which we have the knight on a chessboard. The knight is supposed to visit every square exactly once.
Following it we have two cases:
Closed Tour : The knight ends on a square that is one move away from the beginning square. This means that if it continues to move, with the same path that it has followed till now, it will be able to traverse all squares again.Open Tour : The knight ends on any other square.This problem is solved on a n ...
std::variant in C++
std::variant was added in C++17 to support the sum type. It adds more functionality to union and hence is a safer version of it.
Sum types and product typesA type defines the set of values and the permissible operations on those values. For example it might make sense to concatenate two strings.
Types are usually classified into different typeclasses such as enumerable, comparable etc. The types of our interest are composite types that have sum type and product type.
The Sum types like T1+T2 co...
Spaceship operator in C++
The three-way comparison operator , colloquially called the spaceship operator was added in C++20.
ComparisonComparison is one of the most commonly used operations in a program. Comparing the built-in types like int's is defined by the language. However, comparison of user-defined types is provided by means of operator overloading.
When we compare objects A and B we are actually calling the operators with parameter. So something like A might evaluate as A.operator. Ofcourse the operator has to ...
Database replication
To discuss database replication, we first need to discuss the concept of replication in computing. Replication involves making copies of software, hardware, data, objects, states or such other related items and sharing them across multiple systems to achieve consistency and improve aspects like accessibility, fault tolerance and reliability.
Simply defined database replication is about storing copies of same data in many locations for backup, efficiency and other reasons. It also involves consid...
Young Tableaus data structure
Young Tableaus data structure is a unique form of matrix in which all elements of a row are in sorted order from the left to right and that of a column are in sorted order from top to bottom.
We can perform different operations on this matrix. In this article we will discuss the below mentioned functions:
Insertion of elementSearch for an elementDeletion of elementReplace an elementSome values are infinity to signify invalid value.
In this problem, we start from the bottom right element ...
February 28, 2021
Finding nodes at distance K from a given node
In this article we will discuss the approach to find out the nodes at k distance from the given node.
Let us assume we have a binary tree. Let the node given to us be 'Target Node'. Now, we need to find all nodes at distance k from 'Target Node'. Those k nodes could be parent as well as child nodes of the 'Target Node'.
Below is the code that represents the implementation of the Tree:
class Tree{ int value; Tree right; Tree left;}
1. Breadth Fir...