Loads a model from checkpoint and sets up model for inference
| 53 | |
| 54 | // Loads a model from checkpoint and sets up model for inference |
| 55 | std::unique_ptr<model> load_inference_model(lbann_comm* lc, |
| 56 | std::string cp_dir, |
| 57 | int mbs, |
| 58 | std::vector<El::Int> input_dims, |
| 59 | std::vector<El::Int> output_dims) |
| 60 | { |
| 61 | persist p; |
| 62 | p.open_restart(cp_dir.c_str()); |
| 63 | auto m = std::make_unique<model>(lc, nullptr, nullptr); |
| 64 | m->load_from_checkpoint_shared(p); |
| 65 | p.close_restart(); |
| 66 | |
| 67 | m->setup(mbs, get_trainer().get_grids()); |
| 68 | |
| 69 | return m; |
| 70 | } |
| 71 | |
| 72 | /// Split the MPI communicator into trainers |
| 73 | /// Return the |
no test coverage detected