![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
pytorch
菜就多练,不要多想
这个作者很懒,什么都没留下…
展开
-
python使用timm创建模型出现connect error
通过这个网址把权重下载下来,放到对应的目录地址checkpoint_path,比如checkpoint_path = ‘/home/xxx/wide_resnet50_racm-8234f177.pth’。这是因为timm下载权重默认是从huggingfaceHub,国内一般访问不了。其中backbone_name 是你要创建的模型名比如resnet50,自己修改下。上面的url就是权重下载链接,我这里下载的是wide_resnet50_2的权重。本人的timm版本是 0.9.11的。原创 2023-11-21 13:41:08 · 659 阅读 · 2 评论 -
解决opencv读取(保存)不了路径为中文名的图片办法
读取图片:img = cv2.imdecode(np.fromfile(inputpath,dtype=np.uint8), -1)保存图片:cv2.imencode('.jpg',rotated_img)[1].tofile(outpath) #'.jpg'按自己需要填写图片格式原创 2022-02-28 17:29:59 · 2800 阅读 · 1 评论 -
使用conda时出现Solving environment: failed with initial frozen solve. Retrying with flexible solve错误
使用conda安装pytorch 出现了各种各样的错误。尝试了网上各种办法,最后我是这么解决的。首先添加镜像源,在终端运行以下代码conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/conda config --原创 2021-11-13 12:47:55 · 11812 阅读 · 4 评论 -
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
使用conda安装pytorch老是失败于是使用以下命令安装pytorchconda install pytorch torchvision cudatoolkit=10.1 下载成功原创 2021-10-30 00:26:20 · 256 阅读 · 0 评论