SCANVAE.loss(tensors, inference_outputs, generative_ouputs, feed_labels=False, kl_weight=1, labelled_tensors=None, classification_ratio=None)[source]

Compute the loss for a minibatch of data.

This function uses the outputs of the inference and generative functions to compute a loss. This many optionally include other penalty terms, which should be computed here.

This function should return an object of type LossRecorder.