The plotting routines of Cheetah currently fail if the Segment they are called on contain tensors with require_grad=True. This is because Matplotlib internally calls tensor.numpy(), which fails for tensors that include gradients.
RuntimeError: Can't call numpy() on Tensor that requires grad. Use tensor.detach().numpy() instead.
The plotting routines of Cheetah currently fail if the
Segment
they are called on contain tensors withrequire_grad=True
. This is because Matplotlib internally callstensor.numpy()
, which fails for tensors that include gradients.