Learning Representations For Novelty And Anomaly Detection