Sign in

Machine Learning Practitioner | For collaboration

Can Neural Net solve a 2x2 Jigsaw Puzzle?

Photo by Ashkan Forouzani on Unsplash

Training a Neural Net on permutation invariant data is difficult. And a jigsaw puzzle is one of those.

What is Permutation Invariance?

A function is a permutation invariant if its output does not change by changing the ordering of its input. Here is an example below.

1) f(x,y,z) = ax + by +cz2) f(x,y,z) = xyz

The output of the 1st function will change if we change the input order, but the output of the 2nd function will not change. So 2nd function is permutation invariant.

Weights of the neural net maps to specific input units. When the input changes, the output will…

Photo by Mimi Thian on Unsplash

I launched my first app startup 6 months ago at Playstore. It currently has 1000+ organic users.

Here are my quick and to-the-point tips for you, which I have learned so far. These tips are going to help people who are planning to launch their first app startup.

Note: Following tips are in order as you progress to create and launch your app.

Avoid working on side stuff

  • Before working on the main product, people usually get distracted and work on side things, such as website, logos, social media pages, product name, etc. …

Photo by Sharon on Unsplash

How do you manage your money? How do you keep track of how much to save, invest, spend? And how do you know if you are not overspending?

This is how most people manage their money.

Photo by Vladislav on Unsplash

Sometimes we need to quickly analyze or validate our structured data. Generally, people tend to use pandas since it seems easy and visually good. The problem with pandas is that it can be super slow if you have large data.

We have another alternative which is Linux commands. Linux commands run super fast (even on huge data) and you don't even need an IDE/Notebook to run that. You can just execute them in your terminal.

I am going to use the famous titanic data in this tutorial, as an example. …

Know how to apply a function along the various axis in Data.

Photo by Ridham Nagralawala on Unsplash

I am going to explain a really basic but important topic, Axes and Dimensions. Many people find it quite confusing, especially using axis while applying a function on multi-dimensional data.

Axis or dimensions is a very generic concept. Whether you are handling data in Numpy, Pandas, TensorFlow, or another library, you have to encounter it frequently. And the concepts I am going to explain will be common across all these libraries.

What is the Axis?

In simple words, the Axis is something that represents the dimension of data. Let’s go through various examples to understand it at its core.

Zero Dimensional data

A Scalar is zero-dimensional data…

For Neural Nets

Photo by Isaac Smith on Unsplash

The Loss Function is one of the important components of Neural Network. Loss is nothing but a prediction error of Neural Net. And the method to calculate the loss is called Loss Function.

Loss is used to calculate the gradients for the neural net. And gradients are used to update the weights. This is how a Neural Net is trained.

Keras has many inbuilt loss functions, which I have covered in one of my previous blog. These loss functions are enough for many typical Machine Learning tasks such as Classification and Regression.

But there might be some tasks where we…

Photo by Markus Spiske on Unsplash

You might get into a situation where you need to label your Images for training. Or you already did. One way of labeling is to manually look at each image and write down its label in a file, which is a painful process.

In this blog post, I am going to share how you can make this process fast and easy. Just by writing a few lines of code in Jupyter Notebook. Let’s see the demo first.


I have some cat and dog Images in my Image directory. I want to label a cat as 0 and dog as 1

Can Neural Network detect time from Analog Clocks Images?

Photo by WallpaperFlare

I was really interested in an idea, which was to read the time from Analog Clock Images using Neural Nets. To do this task, I needed a dataset containing clock images, but there was not any dataset available on the web. One other way was to download the clock images from the web and manually label them. Which is a quite time-consuming process.

Finally, I decided to write a python script that generates animated clock images and their respective labels. The following are the few samples of clocks images generated by the script.

Photo by Steijn on Unsplash

I am not going to write about complex maths and algorithms behind the Neural Network. Rather I am going to build your intuition on how a neural network works. I am going to do so by creating the smallest neural network and train it to do a simple task.

Intuitions are not to be ignored John. They represent data processed too fast for the conscious mind to comprehend - Sherlock Holmes

The idea behind Neural Nets

A neural network is a collection of weights. We can train a neural network on a set of input and output(target or label). The weights inside the neural net…

A comparison with standard Python Lists.

Photo by Lukas on Unsplash

Originally Python was not designed for numeric computation. As people started using python for various tasks, the need for fast numeric computation arose. And the Numpy was created by a group of people in 2005 to address this challenge.

Today in the era of Artificial Intelligence, it would not have been possible to train Machine Learning algorithms without a fast numeric library such as Numpy.

The following are the main reasons behind the fast speed of Numpy.

  • Numpy array is a collection of similar data-types that are densely packed in memory. …

Shiva Verma

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store