Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/pufferl.cu
Original file line number Diff line number Diff line change
Expand Up @@ -1735,6 +1735,9 @@ void pufferl_load_policy(PuffeRL* pufferl, int i, const char* path) {
Policy* pol = &pufferl->policies[i];
puf_load_weights_into(pol->master_weights, pol->param,
pufferl->default_stream, path);
if (i == 0 && pufferl->hypers.async) {
puf_copy(&pufferl->actor_param, &pol->param, pufferl->default_stream);
}
cudaDeviceSynchronize();
}

Expand Down Expand Up @@ -2959,6 +2962,13 @@ TrainResult run_train(Ini* ini, TrainContext* ctx) {
}

PuffeRL* pufferl = create_pufferl(ini, ctx);
char load_path_buf[4096];
const char* load_path = puf_checkpoint_path_key(
ini, "load_model_path", load_path_buf, sizeof(load_path_buf));
if (load_path) {
pufferl_load_policy(pufferl, 0, load_path);
}

Selfplay selfplay = {0};
if (use_selfplay) {
char initial_checkpoint[4096];
Expand Down