import setuptools.pep425tags #根据自己pep425tags文件位置进行相应更改
print(setuptools.pep425tags.get_supported())
报错:ERROR: torch-1.4.0+cpu-cp38-cp38m-win32.whl is not a supported wheel on this platform.
解决方法:
在自己的python文件夹的site-packages中寻找pep425tags.py文件
2、修改为 pip install torch-1.4.0+cpu-cp38-none-win32.whl,安装成功
3、上面的都不好使 用这行 代码 python -m pip debug --verbose
4、torch.cuda.is_available()
import os
import torch
from torch import nn
from torch.utils.data import DataLoader
from torchvision import datasets, transforms
device = "cuda" if torch.cuda.is_available() else "cpu"
print(f"Using {device} device")
class NeuralNetwork(nn.Module):
def __init__(self):
sup