2
$\begingroup$

I would like to reconstruct an image by using autoencoder. I have an autoencoder that I implemented by following the UFLDL Stanford tutorial.

  • I extract random 8x8 patches from images (512x512).
  • the patches are then normalized to [0.1, 0.9].
  • then the autoencoder is trained using the normalized patches (with sigmoid activation function).

With trained autoencoder I can encode and decode the patches, but the result after passing it through the autoencoder has somehow different ranges. Could you please explain me why? I thought that the autoencoder should try to reconstruct the input, but somehow it doesn't preserve the ranges what is not clear to me why.

An example of an input (a patch) to the autoencoder (left) and the output (right):

enter image description here

After normalization of both (the input and the output) it seems to be correctly reconstructed (roughly), but I'm not sure why the ranges are not the same. Is that due to regularization? Could somebody help me to understand that?

I'm asking because I would like to reconstruct the whole image, however the original image has black background, but after decoding it is somehow gray-ish. I also thought that it might be problem of my implementation, but after checking some solutions on-line it seems that most of them work the same.

Thank you

$\endgroup$
2
$\begingroup$

The normalization code has three parts:

  1. Mean subtraction

  2. Normalization considering the variance

  3. Adjusting the range between [0.1,0.9]

Did you implement the reconstruction considering the above three steps in the reverse order? Check if you have added the same mean that was subtracted from the patch.

$\endgroup$
  • $\begingroup$ Thank you, actually, the range of input patch is between [0.1,0.9]. However, the range of what I get from output is [0.47,0.52] which is actually the problem I was referring to. If I stretch the output to [0.1,0.9] the reconstruction looks ok comparing to the normalized patch that was on input. Does it mean that my implementation of autoencoder is wrong? $\endgroup$ – bubo Oct 30 '15 at 11:40

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.