摘要: 前言本文中,我将会分析报错 ImportError: attempted relative import with no known parent package 的原因。 当运行python脚本,使用了相对引用方式 (类似 import module) 去引用包时,可能会出现找不到父级包的异常。 阅读全文
posted @ 2024-08-12 14:41 咖啡陪你 阅读(230) 评论(0) 推荐(0) 编辑
摘要: 一、问题描述最近在学习深度学习时,从大神们那里copy的代码中有用到tensorboard_logger这个库的东西,所以很自然地就用conda install或者pip去安装它,但是结果是:python开源库里面没有这东西。 这就让我很苦恼,所以只能自己动手,丰衣足食了。 二、解决方法首先找到te 阅读全文
posted @ 2024-08-12 14:28 咖啡陪你 阅读(18) 评论(0) 推荐(0) 编辑
摘要: conda install To install this package run one of the following: conda install conda-forge::scikit-fuzzy conda install conda-forge/label/cf201901::scik 阅读全文
posted @ 2024-07-12 17:08 咖啡陪你 阅读(7) 评论(0) 推荐(0) 编辑
摘要: Here, I met the error message as follows: def maldroid_noniid(dataset, train_labels, num_users): num_shards, num_imgs = 110, 120 idx_shard = [i for i 阅读全文
posted @ 2024-05-12 16:21 咖啡陪你 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 前言 之前用matplotlib绘制了雷达图,可能代码量会相对多一些,今天我想起了我们之前介绍过的pyecharts,这个绘图神器,也是支持绘制雷达图的,今天我们来看看实现起来会不会更简单。我们还是以买车的朋友选择来作为我们的数据进行绘制。 绘制基础雷达图 pyecharts支持绘制的图形中就包括了 阅读全文
posted @ 2024-03-14 17:16 咖啡陪你 阅读(67) 评论(0) 推荐(0) 编辑
摘要: RuntimeError: scatter(): Expected dtype int64 for index 跑代码时出现报错 RuntimeError: scatter(): Expected dtype int64 for index true_dist.scatter_(1, target. 阅读全文
posted @ 2024-01-15 10:19 咖啡陪你 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 【报错解决】RuntimeError: An attempt has been made to start a new process… 今天来记录一个Pycharm当中的报错解决: RuntimeError: An attempt has been made to start a new proc 阅读全文
posted @ 2023-12-13 14:49 咖啡陪你 阅读(654) 评论(0) 推荐(1) 编辑
摘要: 这个错误通常表示你的环境中没有安装名为 "kornia" 的 Python 模块。Kornia 是一个用于计算机视觉任务的开源库,你可能需要先安装它才能使用相关功能。 你可以使用以下命令使用 pip 安装 kornia: pip install kornia 如果你使用的是 Conda 环境,可以尝 阅读全文
posted @ 2023-12-13 14:45 咖啡陪你 阅读(1027) 评论(0) 推荐(0) 编辑
摘要: 使用cv2读取图片时,输出图片形状大小时出现报错“ 'NoneType' object has no attribute shape”,后来排查发现读取图片的返回值image为None, 这就说明图片根本就没有被读取。 下面图片是问题问题解决后,为了更好的展示,写的代码展示,这是正常的因果关系,找错 阅读全文
posted @ 2023-12-12 16:00 咖啡陪你 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 使用CAJ Viewer 1、使用CAJ Viewer打开想要转换的文件; 2、点击“文件”选项卡,然后选择“打印”选项卡,或者直接按快捷键ctrl+p打开; 3.接下来重点来了,其实我们并不是真的要将CAJ文档打印出来,只是利用PDF虚拟将文档以PDF格式打印并保存下来,所以此时在打印机设备中选择 阅读全文
posted @ 2023-11-22 09:44 咖啡陪你 阅读(47) 评论(0) 推荐(0) 编辑