0
$\begingroup$

I have the basic knowledgment of how an autoencoder works.

In several posts/books/papers is mentioned that, after the training, the encoder part can be used as a dimensionality reduction and the produced "codes" can be used as input in a classifier.

My question is, since the code is a sort of volumetric image (for example I could have a code of dimension 14 x 14 x 32) how can use it as input to a classifier different of CNNs? Could I use it, for example, with a SVM? If so, makes sense to reshape the code in order to have a feature vector?

I'm quite confuse here so, any information would be helpful.

$\endgroup$
1
$\begingroup$

...since the code is a sort of volumetric image (for example I could have a code of dimension 14 x 14 x 32)...

This must not be necessarily the case, it can also be a vector—that depends on the type of the autoencoder. If you have a convolutional autoencoder, though, then it will have such shape.

how can use it as input to a classifier different of CNNs? Could I use it, for example, with a SVM? If so, makes sense to reshape the code in order to have a feature vector?

Exactly; you need to reshape it to a vector. It makes perfect sense. You just need to ensure that the inputs of your convolutional autoencoder have always the same shape, or it could happen that you train the classifier on vectors obtained by reshaping a (14 x 14 x 32) tensor and then try using it on a different image where the autoencoder outputs different shape; since in fully-convolutional networks the size of the output depends on the size of the input, which is a blessing sometimes, and sometimes not.

$\endgroup$
  • $\begingroup$ so, using a "flatten" method should be fine or do I need to use something fancy? $\endgroup$ – Helder Jun 6 '18 at 12:00
  • $\begingroup$ flatten is fine $\endgroup$ – Jan Kukacka Jun 6 '18 at 13:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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