diff --git a/batdetect2/plot.py b/batdetect2/plot.py index 62c4919..bf05cc8 100644 --- a/batdetect2/plot.py +++ b/batdetect2/plot.py @@ -61,7 +61,7 @@ def spectrogram( """ # Convert to numpy array if needed if isinstance(spec, torch.Tensor): - spec = spec.numpy() + spec = spec.detach().cpu().numpy() # Remove batch and channel dimensions if present spec = spec.squeeze()