In the previous blog post, we discussed the nature of sequential data and why we need a robust separate modeling technique to analyze that data. Traditionally, people have been using Hidden Markov Models (HMMs) to analyze sequential data, so we will center the discussion around HMMs in this blog post. HMMs have been implemented for many tasks such as speech recognition, gesture recognition, part-of-speech tagging, and so on. But HMMs place a lot of restrictions as to how we can model our data. HMMs are definitely better than using classical machine learning techniques, but they don’t fully cover the needs of all the modern data analysis. This is because of the constraints that are used to build HMMs. What are those constraints? Continue reading “Deep Learning For Sequential Data – Part II: Constraints Of Traditional Approaches”
Deep Learning For Sequential Data – Part I: Why Do We Need It
Most of the current research on deep learning is focused on images. Deep learning is being actively applied to many areas, but image recognition is definitely generating a lot of buzz. Deep neural networks are being used for image classification tasks and they are able to outperform all the other approaches by a big margin. The networks that are used here are traditional feedforward neural networks that learn how to classify data by generating the optimal feature representation. These neural networks severely limited when it comes to sequential data. Time series data is perhaps the most popular form of sequential data. Why can’t we use feedforward neural networks analyze sequential data? Continue reading “Deep Learning For Sequential Data – Part I: Why Do We Need It”
How To Extract Feature Vectors From Deep Neural Networks In Python Caffe
Convolutional Neural Networks are great at identifying all the information that makes an image distinct. When we train a deep neural network in Caffe to classify images, we specify a multilayered neural network with different types of layers like convolution, rectified linear unit, softmax loss, and so on. The last layer is the output layer that gives us the output tag with the corresponding confidence value. But sometimes it’s useful for us to extract the feature vectors from various layers and use it for other purposes. Let’s see how to do it in Python Caffe, shall we? Continue reading “How To Extract Feature Vectors From Deep Neural Networks In Python Caffe”
How To Programmatically Create A Deep Neural Network In Python Caffe
When you are working with Caffe, you need to define your deep neural network architecture in a ‘.prototxt’ file. These prototxt files usually consist of hundreds of lines, defining layers and corresponding parameters. Before you start training your neural network, you need to create these files and define your architecture. One way to do this is manually write all these lines into a file. But sometimes, it’s beneficial to dynamically create this architecture depending on our needs. In such cases, creating a deep neural network programmatically can be very useful. Let’s go ahead and see how to do it in Python Caffe, shall we? Continue reading “How To Programmatically Create A Deep Neural Network In Python Caffe”
Understanding Locally Connected Layers In Convolutional Neural Networks
Convolutional Neural Networks (CNNs) have been phenomenal in the field of image recognition. Researchers have been focusing heavily on building deep learning models for various tasks and they just keeps getting better every year. As we know, a CNN is composed of many types of layers like convolution, pooling, fully connected, and so on. Convolutional layers are great at dealing with image data, but there are a couple of restrictions as well. The DeepFace network built by Facebook used another type of layer to speed up their training and get amazing results. This layer is called Locally Connected Layer with unshared weights. So what exactly does it do that other layers can’t? Continue reading “Understanding Locally Connected Layers In Convolutional Neural Networks”
What Is Local Response Normalization In Convolutional Neural Networks
Convolutional Neural Networks (CNNs) have been doing wonders in the field of image recognition in recent times. CNN is a type of deep neural network in which the layers are connected using spatially organized patterns. This is in line with how the human visual cortex processes image data. Researchers have been working on coming up with better architectures over the last few years. In this blog post, we will discuss a particular type of layer that has been used consistently across many famous architectures. This layer is called Local Response Normalization layer and it plays an important role. What does it do? What’s the advantage of having this in our network? Continue reading “What Is Local Response Normalization In Convolutional Neural Networks”
Understanding Xavier Initialization In Deep Neural Networks
I recently stumbled upon an interesting piece of information when I was working on deep neural networks. I started thinking about initialization of network weights and the theory behind it. Does the image to the left make sense now? The guy in that picture is lifting “weights” and we are talking about network “weights”. Anyway, when we implement convolutional neural networks, we tend to utilize all the knowledge and research available out there. A good number of things in deep learning are based on heuristics! It’s worth exploring why we do things in a certain way whenever it’s possible. This goes a long way in unlocking the hidden mysteries of deep learning and why it’s so unbelievably accurate. Let’s go ahead and understand how network weights are initialized, shall we? Continue reading “Understanding Xavier Initialization In Deep Neural Networks”
How Are Decision Trees Constructed In Machine Learning
Decision trees occupy an important place in machine learning. They form the basis of Random Forests, which are used extensively in real world systems. A famous example of this is Microsoft Kinect where Random Forests are used to track your body parts. The reason this technique is so popular is because it provides high accuracy with relatively little effort. They are fast to train and they are not computationally expensive. They are not sensitive to outliers either, which helps them to be robust in a variety of cases. So how exactly are they constructed? How are the nodes in the trees generated so that they are optimal? Continue reading “How Are Decision Trees Constructed In Machine Learning”
How To Debug In Python
As with all programming related tasks, debugging is an important part. If you are using an IDE, then you’ll have some kind debugging feature available. But most Python programmers like to use vim or any text editor to write code and then execute it from the terminal. So how can you debug in this situation? Whenever you are working on a project, it’s nice to have a set of tools that can be used to understand what’s happening during execution. Python has an inbuilt debugger called pdb, which stands for “Python DeBugger”. Big surprise, right? It’s a great tool to analyze your code. In this blog post, we’ll see how to use some of its most popular features. Let’s get started, shall we? Continue reading “How To Debug In Python”
How To Create A Web Server In Python Using Flask
Let’s say you’ve built an interesting Python application that runs locally on your machine. Great! Now how can you make that application usable as a service or an API? A lot of times, people build many services that need to play well together to build a final application. An obvious solution to this is to build a web server like Django that can host your application and handle all the incoming requests. But building a full fledged web server seems like an overkill, especially when you are dealing with lightweight services that only need a couple of functionalities. This is where Flask comes into picture! Flask is a Python microframework that can be used to build web servers and create web applications. How do we do that? How do we build a server that can handle different types of requests? Continue reading “How To Create A Web Server In Python Using Flask”