It would be nice to have the optimizer string be case insensitive. For example, build_optimizer could accept both 'sgd' and 'SGD' as valid optimizers.