Why rotation-invariant neural networks are not used in winners of the popular competitions?

The recent progress in image recognition which was mainly made by changing the approach from a classic feature selection – shallow learning algorithm to no feature selection – deep learning algorithm wasn’t only caused by mathematical properties of convolutional neural networks. Yes – of course their ability to capture the same information using smaller number … Read more

What are forward and backward passes in neural networks?

The “forward pass” refers to calculation process, values of the output layers from the inputs data. It’s traversing through all neurons from first to last layer. A loss function is calculated from the output values. And then “backward pass” refers to process of counting changes in weights (de facto learning), using gradient descent algorithm (or … Read more

ValueError: Target size (torch.Size([16])) must be the same as input size (torch.Size([16, 1]))

target = target.unsqueeze(1), before passing target to criterion, changed the target tensor size from [16] to [16,1]. Doing it solved the issue. Furthermore, I also needed to do target = target.float() before passing it to criterion, because our outputs are in float. Besides, there was another error in the code. I was using sigmoid activation … Read more

How to understand SpatialDropout1D and when to use it?

To make it simple, I would first note that so-called feature maps (1D, 2D, etc.) is our regular channels. Let’s look at examples: Dropout(): Let’s define 2D input: [[1, 1, 1], [2, 2, 2]]. Dropout will consider every element independently, and may result in something like [[1, 0, 1], [0, 2, 2]] SpatialDropout1D(): In this … Read more

What does TensorFlow’s `conv2d_transpose()` operation do?

This is the best explanation I’ve seen online how convolution transpose works is here. I’ll give my own short description. It applies convolution with a fractional stride. In other words spacing out the input values (with zeroes) to apply the filter over a region that’s potentially smaller than the filter size. As for the why … Read more

Why should we use Temperature in softmax? [closed]

One reason to use the temperature function is to change the output distribution computed by your neural net. It is added to the logits vector according to this equation : 𝑞𝑖 =exp(𝑧𝑖/𝑇)/ ∑𝑗exp(𝑧𝑗/𝑇) where 𝑇 is the temperature parameter. You see, what this will do is change the final probabilities. You can choose T to … Read more

What is the difference between UpSampling2D and Conv2DTranspose functions in keras?

UpSampling2D is just a simple scaling up of the image by using nearest neighbour or bilinear upsampling, so nothing smart. Advantage is it’s cheap. Conv2DTranspose is a convolution operation whose kernel is learnt (just like normal conv2d operation) while training your model. Using Conv2DTranspose will also upsample its input but the key difference is the … Read more