Skip to main content

Posts

Number of Filters in CNN

Let's say we have 3 channels in input [layer] and 64 channels/feature maps in output [layer]. How are 3 channels converted to 64 channels? How many filters do we need? To produce each / one feature map in output you will need 3 filters - one for each input channel. R - (one filter conv) - | G - (one filter conv) - | --> (summed after conv)--> | one output B - (one filter conv) - | So to generate 64 channels/feature maps in output, you'll need 3x64 filters/kernels. Thus, simply, Number of Filters = No. of Input Channels x No. of Output Channels. Or, You can think the filter is not 2D at all. Say we have an input of HxWxN, where HxW is the height and width of the image and N is the depth or number of channels, so our filter will be AxBxN, so not a 2D but an n-D filter. And we do the n-D convolution (basically a dot product of each pixel, whatever the dimension). [PS: Each filter has a bias, so AxNxN + 1 = number for params for 1 output] [Source]

Mutually Exclusive Vs. Statistically Independent

Source: https://math.stackexchange.com/questions/941150/what-is-the-difference-between-independent-and-mutually-exclusive-events Summary: Mutually Exclusive: Events cannot happen at the same time. [In one experiment] Statistically Independent: Occurrence of one event doesn't affect other. [In two experiments] Mutually Exclusive: [Wikipedia] In logic and probability theory, two events (or propositions) are mutually exclusive or disjoint if they cannot both occur at the same time(be true). A clear example is the set of outcomes of a single coin toss, which can result in either heads or tails, but not both. Statistically Independent: When two events are said to be independent of each other, what this means is that the probability that one event occurs in no way affects the probability of the other event occurring. An example of two independent events is as follows; say you rolled a die and flipped a coin. The probability of getting any number face on the die in ...

Setting Up Sublime Text 3 for Python (2 and 3) Development

This is the continuation of this tutorial: http://algidus.blogspot.com/2017/12/installing-python-3-and-2-in-windows-10.html We will now set up Sublime Text 3 to run codes of both Python 2 and 3. First Download Sublime Text 3: https://www.sublimetext.com/3 By Default, the "Build System" of Sublime Text 3 is set to "Automatic" . To change the "Build System" , go to "Menu" Bar (Press "Alt" if it's not visible) and select "Tools" and "Build System" . Then select "Python" from the options. In the previous tutorial, we kept Python 3 as our default Python Version (By setting its path in the "Environmental Variables") . So, in Sublime Text 3, when you select "Python" in the "Build System", you'll be running the code in "Python 3". Now we're going to add a Custom Build System for "Python 2". To add a Build System for "Python 2...

Installing Python 3 and 2 in Windows 10 (x64)

This is a tutorial on how to install Python 3 and Python 2 on Windows 10 (x64) and how to use them independently and interchangeably. Download both versions of python from the official website: https://www.python.org/downloads For this tutorial I downloaded: Python 3: https://www.python.org/ftp/python/3.6.3/python-3.6.3-amd64.exe Python 2: https://www.python.org/ftp/python/2.7.14/python-2.7.14.amd64.msi You can either install Python 3 or Python 2 first. The idea behind running both versions independently and not interfering with each other is to set the path of one of them in the Environment Variables and other not. This will be clear later in this tutorial. For me, I wanted to set Python 3 as my primary python (i.e. set in the PATH of Environment Variables) so, I installed it first. Installing Python 3 1. Open the downloaded Python 3 exe file. 2. [For Default Installation] We will be installing it in the default location [If you want to install it in your desired lo...