Commit c1afed3c authored by Nicola Gatto's avatar Nicola Gatto
Browse files

Adjust network creation to stream update

parent 8855f6c7
...@@ -151,10 +151,10 @@ if __name__ == "__main__": ...@@ -151,10 +151,10 @@ if __name__ == "__main__":
'session_dir': resume_directory, 'session_dir': resume_directory,
'environment': env, 'environment': env,
<#if config.rlAlgorithm == "dqn"> <#if config.rlAlgorithm == "dqn">
'net': qnet_creator.net, 'net': qnet_creator.networks[0],
<#else> <#else>
'actor': actor_creator.net, 'actor': actor_creator.networks[0],
'critic': critic_creator.net 'critic': critic_creator.networks[0]
</#if> </#if>
} }
agent = ${rlAgentType}.resume_from_session(**resume_agent_params) agent = ${rlAgentType}.resume_from_session(**resume_agent_params)
...@@ -168,7 +168,7 @@ if __name__ == "__main__": ...@@ -168,7 +168,7 @@ if __name__ == "__main__":
if train_successful: if train_successful:
<#if (config.rlAlgorithm == "dqn")> <#if (config.rlAlgorithm == "dqn")>
agent.save_best_network(qnet_creator._model_dir_ + qnet_creator._model_prefix_ + '_newest', epoch=0) agent.save_best_network(qnet_creator._model_dir_ + qnet_creator._model_prefix_ + '_0_newest', epoch=0)
<#else> <#else>
agent.save_best_network(actor_creator._model_dir_ + actor_creator._model_prefix_ + '_newest', epoch=0) agent.save_best_network(actor_creator._model_dir_ + actor_creator._model_prefix_ + '_0_newest', epoch=0)
</#if> </#if>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment