上一页 1 ··· 38 39 40 41 42 43 44 45 46 ··· 74 下一页
摘要: import numpy as np out1=np.load('output1.npy') out2=np.load('output2.npy') t1=np.load('t1.npy') t2=np.load('t2.npy') result = np.absolute(np.array(out 阅读全文
posted @ 2022-08-28 17:24 祥瑞哈哈哈 阅读(43) 评论(0) 推荐(0)
摘要: MindConverter将PyTorch(ONNX)模型快速迁移到MindSpore框架下使用。 第一步:pytorch模型转onnx: import torch # 根据实际情况替换以下类路径 from customized.path.to.pytorch.model import PyTorc 阅读全文
posted @ 2022-08-28 11:25 祥瑞哈哈哈 阅读(1159) 评论(0) 推荐(0)
摘要: @表示本地机器的相对路径,不能直接使用pip requiremen.txt.需要 pip list --format=freeze > requirements.txt 在安装 阅读全文
posted @ 2022-08-21 20:07 祥瑞哈哈哈 阅读(259) 评论(0) 推荐(0)
摘要: 就是找到工具解析pytorch的pth文件的权重,构建计算图生成mindspore框架。 阅读全文
posted @ 2022-08-20 09:32 祥瑞哈哈哈 阅读(15) 评论(0) 推荐(0)
摘要: da=torchvision.transforms.Compose([torchvision.transforms.ToTensor()])#必须有这步否则会出现 default_collate: batch must contain tensors, numpy arrays, numbers, 阅读全文
posted @ 2022-08-14 10:24 祥瑞哈哈哈 阅读(176) 评论(0) 推荐(0)
摘要: i=0 dir_fold="E:/1深度学习/cifar-100/imag/mini-imagenet/100/mini-imagenet/images" dir_fold1="E:/1深度学习/cifar-100/imag/mini-imagenet/100/mini-imagenet/train 阅读全文
posted @ 2022-08-13 22:44 祥瑞哈哈哈 阅读(35) 评论(0) 推荐(0)
摘要: path='test.csv' data=pd.read_csv(path) x=data['label'] xt=x.drop_duplicates( keep='first', inplace=False) xt=xt.values for i in range(len(xt)): dir="E 阅读全文
posted @ 2022-08-13 22:21 祥瑞哈哈哈 阅读(65) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-13 21:20 祥瑞哈哈哈 阅读(66) 评论(0) 推荐(0)
摘要: imageFolde读取数据集标签即是文件夹名称配合DataLoader即可组成可迭代数据集。 阅读全文
posted @ 2022-08-13 12:33 祥瑞哈哈哈 阅读(77) 评论(0) 推荐(0)
摘要: for i in range(len(w1)): lable=w1[i] if lable in w1: w=w.replace(lable,i) print(i) print(w) w1是numpy类型的数据结构。w是DataFrame类型的数据结构。 阅读全文
posted @ 2022-08-12 22:16 祥瑞哈哈哈 阅读(26) 评论(0) 推荐(0)
上一页 1 ··· 38 39 40 41 42 43 44 45 46 ··· 74 下一页