torch.accelerator.current_device_idx¶ torch.accelerator.current_device_idx()[source]¶ 返回當前 加速器 當前選中裝置的索引。 返回 當前選中裝置的索引。 返回型別 int