Why my loss is negative while training SAE?
Use a linear output and mean squared error loss, assuming you are predicting normalised pixel intensity values.

Cross-entropy over sigmoid output layer activations can do odd things when the values are not strictly in $\{0,1\}$, depending on implementation.