适用于 pytorch 版本大于等于 1.0.0
# -*- coding:utf-8 -*-
from __future__ import print_function
from __future__ import division
import torch
import torch.nn as nn
import torch.optim as optim
import numpy as np
import torchvision
from torchvision import datasets, models
来源:CSDN
作者:snow_lee_liwei
链接:https://blog.csdn.net/snow_lee_liwei/article/details/103639252