'Builds the loss Tensor.
Outputs:
self.total_loss'

def build_loss(self):

    if (self.mode != 'encode'):
        total_loss = tf.losses.get_total_loss()
        tf.summary.scalar('losses/total', total_loss)
        self.total_loss = total_loss
