torch.accelerator.current_device_idx¶ torch.accelerator.current_device_idx()[source]¶ 返回当前 加速器 当前选中设备的索引。 返回 当前选中设备的索引。 返回类型 int