Setting up Training Environment... Creating Liquid PPO Agent... Using cpu device Wrapping the env with a `Monitor` wrapper Wrapping the env in a DummyVecEnv. Starting Training (This may take a while)... ---------------------------------- | rollout/ | | | ep_len_mean | 1e+03 | | ep_rew_mean | -2.12e+04 | | time/ | | | fps | 464 | | iterations | 1 | | time_elapsed | 4 | | total_timesteps | 2048 | ---------------------------------- Traceback (most recent call last): File "/home/ylop/Documents/drone go brr/Drone-go-brrrrr/Drone-go-brrrrr/train.py", line 35, in train() ~~~~~^^ File "/home/ylop/Documents/drone go brr/Drone-go-brrrrr/Drone-go-brrrrr/train.py", line 28, in train model.learn(total_timesteps=total_timesteps, callback=checkpoint_callback) ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ylop/.local/lib/python3.14/site-packages/stable_baselines3/ppo/ppo.py", line 311, in learn return super().learn( ~~~~~~~~~~~~~^ total_timesteps=total_timesteps, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<4 lines>... progress_bar=progress_bar, ^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/home/ylop/.local/lib/python3.14/site-packages/stable_baselines3/common/on_policy_algorithm.py", line 337, in learn self.train() ~~~~~~~~~~^^ File "/home/ylop/.local/lib/python3.14/site-packages/stable_baselines3/ppo/ppo.py", line 275, in train loss.backward() ~~~~~~~~~~~~~^^ File "/home/ylop/.local/lib/python3.14/site-packages/torch/_tensor.py", line 625, in backward torch.autograd.backward( ~~~~~~~~~~~~~~~~~~~~~~~^ self, gradient, retain_graph, create_graph, inputs=inputs ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/home/ylop/.local/lib/python3.14/site-packages/torch/autograd/__init__.py", line 354, in backward _engine_run_backward( ~~~~~~~~~~~~~~~~~~~~^ tensors, ^^^^^^^^ ...<5 lines>... accumulate_grad=True, ^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/home/ylop/.local/lib/python3.14/site-packages/torch/autograd/graph.py", line 841, in _engine_run_backward return Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ t_outputs, *args, **kwargs ^^^^^^^^^^^^^^^^^^^^^^^^^^ ) # Calls into the C++ engine to run the backward pass ^ RuntimeError: Trying to backward through the graph a second time (or directly access saved tensors after they have already been freed). Saved intermediate values of the graph are freed when you call .backward() or autograd.grad(). Specify retain_graph=True if you need to backward through the graph a second time or if you need to access saved tensors after calling backward.