Spaces:
Runtime error
Runtime error
File size: 3,044 Bytes
6083286 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
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 <module>
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.
|