torch.accelerator.current_device_idx¶ torch.accelerator.current_device_idx()[原始碼]¶ 傳回目前 加速器 所選裝置的索引。 返回值 目前所選裝置的索引。 回傳類型 int