Trains for max_epochs rather than 50