【d2l】【常见函数】【2】 torch.tensor.to(device)

lycnight / 2023-07-25 / 原文

指定读取张量的设备,如GPU,CPU
参考:https://blog.csdn.net/shaopeng568/article/details/95205345
image

d2l实例
image