code: public INDArray reconstructionProbability(INDArray data, int numSamples) {
          INDArray reconstructionLogProb = reconstructionLogProbability(data, numSamples);
          return Transforms.exp(reconstructionLogProb.castTo(DataType.DOUBLE), false);    //Cast to double to reduce risk of numerical underflow
      }
docs: Calculate the reconstruction probability, as described in An & Cho, 2015 - "Variational Autoencoder based
  Anomaly Detection using Reconstruction Probability" (Algorithm 4)<br>
  The authors describe it as follows: "This is essentially the probability of the data being generated from a given
  latent variable drawn from the approximate posterior distribution."<br>
  <br>
  Specifically, for each example x in the input, calculate p(x). Note however that p(x) is a stochastic (Monte-Carlo)
  estimate of the true p(x), based on the specified number of samples. More samples will produce a more accurate
  (lower variance) estimate of the true p(x) for the current model parameters.<br>
  <br>
  Internally uses {@link #reconstructionLogProbability(INDArray, int)} for the actual implementation.
  That method may be more numerically stable in some cases.<br>
  <br>
  The returned array is a column vector of reconstruction probabilities, for each example. Thus, reconstruction probabilities
  can (and should, for efficiency) be calculated in a batched manner.
  
  @param data       The data to calculate the reconstruction probability for
  @param numSamples Number of samples with which to base the reconstruction probability on.
  @return Column vector of reconstruction probabilities for each example (shape: [numExamples,1])