[model] optimizer can now be an optimizer instance, instead of a string