(config)
| 36 | |
| 37 | |
| 38 | def build_model(config): |
| 39 | model_name = config.model |
| 40 | |
| 41 | model_class = registry.get_model_class(model_name) |
| 42 | |
| 43 | if model_class is None: |
| 44 | registry.get("writer").write("No model registered for name: %s" % model_name) |
| 45 | model = model_class(config) |
| 46 | |
| 47 | if hasattr(model, "build"): |
| 48 | model.build() |
| 49 | model.init_losses_and_metrics() |
| 50 | |
| 51 | return model |
| 52 | |
| 53 | |
| 54 | def build_optimizer(model, config): |
no test coverage detected