3
$\begingroup$

I am building a CNN and I want to maintain translational variance. Most CNNs use pooling and stride which allows for the useful side effect of translational invariance, meaning that if a feature appears in a scene it will be picked up as the same feature. But what if the position of the feature in the scene is information I want to keep/maintain/learn? Do I just have a stride of 1 and don't do pooling? This question is similar: Translational variance in convolutional neural networks

$\endgroup$

1 Answer 1

2
$\begingroup$

If you don't need exact position, you can use any CNN, but you need to be sure what you are doing.

Firstly, convolution is local, but in deeper layers each neuron is processing information from larger part of the input image. You can calculate the size of such part for each layer (it is increased both by convolution and pooling), and reduce the depth of the convolution part of the network accordingly (or use smaller kernels etc.). Basically, you don't want a situation where convolution neurons are processing information from a whole input image, then the spatial positions are probably lost.

For example if you have an image of size 28x28, like in MNIST data. If you use a CNN with a single convolution 5x5 (with padding) and 2x2 pooling, each neuron in 14x14 map of the result contains information from at most 6x6 part of the input image (less if it processed padded zeros)

$\endgroup$
3
  • $\begingroup$ The location of my feature is really important for me to keep. $\endgroup$
    – ashley
    Commented Jun 29, 2017 at 19:18
  • $\begingroup$ What do you mean by "keep"? If you want to extract different objects with their exact positions and whole shapes, you have a segmentation task, there are CNNs made for that too. $\endgroup$ Commented Jun 29, 2017 at 20:12
  • $\begingroup$ Same object in different positions. I am only looking at one object in different positions. The positions play a role in how I can further interact with the object. i.e. the position of view is important which sets the position and orientation of the object. $\endgroup$
    – ashley
    Commented Jun 30, 2017 at 13:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.