Added exit method to neural_network so that one can exit the compute cluster.