第四次作业:猫狗大战挑战赛前言代码实现测试结果及改进结果参与练习赛总结
import numpy as npimport matplotlib.pyplot as pltimport osimport torchimport torch.nn as nnimport torchvisionfrom torchvision import models,transforms,datasetsimport timeimport jsondevice = torch.device("cuda:0" if torch.cuda.is_available()