MCPcopy Create free account
hub / github.com/LBANN/lbann / load_inference_model

Function load_inference_model

src/utils/lbann_library.cpp:55–70  ·  view source on GitHub ↗

Loads a model from checkpoint and sets up model for inference

Source from the content-addressed store, hash-verified

53
54// Loads a model from checkpoint and sets up model for inference
55std::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

Callers 1

mainFunction · 0.85

Calls 5

open_restartMethod · 0.80
close_restartMethod · 0.80
get_gridsMethod · 0.80
setupMethod · 0.45

Tested by

no test coverage detected