Ke Lin
Ke Lin
You can change the function 'train_actor_critic', like the following: ```python def train_actor_critic(): ... critic_optim.zero_grad() actor_optim.zero_grad() loss.backward(retain_graph=True) loss.backward() critic_optim.step() actor_optim.step() ```
You can make `n_trajectories` small, in `config.yaml` file, such as `10`.
I think I have found the answer. The key is `edge['safe'] = safe_set[node:node + 1, edge['action']]`, which means it is a reference (*^_^*).
Thanks for your reply!