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