好吧,我不是这方面的专家。这是给你的计时结果。%timeit torch.randn(100, 100).to(device)The slowest run took 12.65 times longer than the fastest. This could mean that an intermediate result is being cached.10000 loops, best of 3: 129 µs per loop%timeit torch.randn(100, 100, device = device)The slowest run took 88.54 times longer than the fastest. This could mean that an intermediate result is being cached.100000 loops, best of 3: 11.6 µs per loopPS 我在 Google Colab 上执行了这两个命令。