hmm ok I will try be a little clearer,
To my understanding, (which might be wrong)
X is the data before going into the encoder and x_sample is the data that has come out of the decoder.
Because I am using my own data I have done what I believe to be the correct preprocessing, which is to apply the whitening method described above which as you corrected me on, standardizes my data to 0, before feeding it into the VAE.
Are you suggesting that for BCE to work correctly, my target (The input to the VAE) has to be scaled to the range [0,1]? If this is correct, how would I do this? Should I scale it per piece of data that I have or should I take the min max out of my entire data set and scale by the global min max?
I am unclear on a) what should the target values look like. b) how they should be scaled and any preprocessing used on the target. c) that I am correct in thinking that  x (target) is input to VAE and x_sample (input) is the out put of the VAE,
Thanks again for your help