- 博客(29)
- 资源 (1)
- 收藏
- 关注
原创 TypeError: __array__(): incompatible function arguments. The following argument types are supported:
配置GPU版的paddle环境:没有报错。验证是否正常安装时,执行:报错如下:发现是Python版本的问题,将python3.10降低至3.9,再执行:反馈如下:
2024-08-29 15:09:16
1040
3
原创 ValidationError: 1 validation error for Crew verbose value could not be parsed to a boolean (type=
中的verbose赋值为1即可。
2024-07-03 14:40:19
306
原创 APIInternalError: Error code: 500, with error text {“error“:{“code“:“400“,“message“:“账户余额不足,冻结余额失败“}
APIInternalError: Error code: 500, with error text {“error”:{“code”:“400”,“message”:“账户余额不足,冻结余额失败”}}查询账户是有余额赠送的,但是经过查阅。显示赠送的余额并不能用于微调。
2024-07-01 14:42:14
241
原创 APIRequestFailedError: Error code: 400, with error text {“error“:{“code“:“1622“,“message“:“文件内容异常:请确
APIRequestFailedError: Error code: 400, with error text {“error”:{“code”:“1622”,“message”:“文件内容异常:请确保jsonl文件中每行都是标准的json数据”}}经对比自己生成的数据与平台开发文档要求的数据格式不一致,平台要求名为“messages”,而报错是由于提交了名为“message”。
2024-07-01 13:51:30
827
1
原创 The checkpoint being loaded used a DP world size of 2 but the current world size is 1
用双显卡训练的模型,当用单卡继续加载训练时,会出现如题目所示情况。此时要将输出模型目录修改,重新训练模型。
2023-10-31 14:02:25
728
原创 No module named ‘deepspeed.accelerator‘
是由于离线安装和在线的pip install安装方法在加载该包时方法不一样,因此会报如上错误。到离线包的位置找到accelerator,将该包拷贝到相应位置即可。
2023-10-17 17:39:48
1469
2
原创 ModuleNotFoundError: No module named ‘configs.model_config‘
因为在项目的目录configs中,文件名不是以py结尾的,因此要将文件名重新拷贝成py结尾的文件,即可解决!
2023-09-11 15:28:44
610
原创 如果开启了8bit量化加载,项目无法启动,参考此位置,选择合适的cuda版本
说明量化过程,需要 accelerate 与 bitsandbytes 模块。
2023-06-28 11:39:39
4005
16
原创 RuntimeError: Error(s) in loading state_dict for DataParallel:
用pytorch搭建基于GPU运行环境的神经网络,训练时报错如下:RuntimeError: Error(s) in loading state_dict for DataParallel:对治方法:将net = torch.nn.DataParallel(net)删除即可。
2023-06-23 20:24:01
543
原创 IndexError: tuple index out of range
运行预训练模型 densenet161,训练好模型,用pytorch加载模型时,报错如下:net()将程序改为解决~!
2023-06-17 23:15:36
286
原创 AttributeError: No huggingface_hub attribute hf_api
将 datasets 模块版本降至 2.3.2 即可。import datasets 模块时,报错如标题。的 datasets==2.3.2。
2023-05-29 13:57:52
1692
1
原创 RuntimeError: CUDA Error: no kernel image is available for execution on the device
配置好服务器与python环境后,发现 ChatGLM-6b 模型可运行,但是 ChatGLM-6b-int4 模型运行不了,因此,在进行ptuning 的时候,将 train.sh 中的最后一行 quantization_bit 4 删除之后,此问题解决。配置ChatGLM过程中,出现如上问题。
2023-05-15 21:54:52
250
原创 ImportError: cannot import name ‘data‘ from partially initialized module ‘cv2‘
import cv2 报错如下:ImportError: cannot import name ‘data’ from partially initialized module ‘cv2’重新将opencv版本4降到版本3,即可。
2022-02-10 10:38:53
2736
1
原创 AttributeError: module ‘PIL.Image‘ has no attribute ‘fromstring‘
Import PIL使用 PIL.Image.fromstring 函数报错如下:AttributeError: module ‘PIL.Image’ has no attribute ‘fromstring’解决办法:查阅PIL.Image文件中是否有该函数,发现没有但是找到类似函数如下:PIL.Image.frombytes说明目前使用PIL版本中删除了名字fromstring,改成了其他名。...
2022-02-08 14:51:21
3023
原创 TypeError: unsupported operand type(s) for +: ‘NoneType‘ and ‘str‘
在运行GitHub开源项目Hyperspectral-Classification的main.py程序的时候,报错如下:Computation on CPUTraceback (most recent call last):File “F:\PythonProgram\study\Hyperspectral_Classification\program1\main.py”, line 164, in viz = visdom.Visdom(env=DATASET + ’ ’ + MODEL)Typ
2022-01-07 17:06:24
4898
16
原创 AttributeError: module ‘cv2.cv2‘ has no attribute ‘ximgproc‘
运行如下代码时:cv2.ximgproc.segmentation.createSelectiveSearchSegmentation()报错如下:AttributeError: module ‘cv2.cv2’ has no attribute ‘ximgproc’解决办法:在 anaconda prompt 以管理员身份安装了 opencv-contrib-python包之后,解决。...
2021-10-04 13:39:26
1177
1
原创 solving environment: failed with repodata from current_repodata.json, will retry with next repodata
conda 创建新环境,命令如下:conda create -n opencv python=3.8报错如下:solving environment: failed with repodata from current_repodata.json, will retry with next repodata查找解决问题办法,发现网上办法步骤较多,我用其中的一部分即解决。更换了清华安装源:conda config --add channels https://mirrors.tuna.tsingh
2021-10-04 11:36:05
54370
17
原创 UnpicklingError: the STRING opcode argument must be quoted
用 sklearn 运行如下代码:from sklearn.datasets import fetch_olivetti_facesfaces = fetch_olivetti_faces(data_home=’./’)报错如下:UnpicklingError: the STRING opcode argument must be quoted问题分析:经分析,在之前 sklearn 0.24.1 版本下运行时不会报错,到了另外一台电脑sklearn 0.20.1 运行即报错。问题解决:更
2021-09-16 17:20:46
428
原创 用 load_sample_image 加载图像,报错:AttributeError: Cannot find sample image:
如下,用 sklearn 的 load_sample_image 加载 png 格式图像,from sklearn.datasets import load_sample_imageimage = load_sample_image(“image.png”)报错如下:AttributeError: Cannot find sample image: image.png解决办法:将 image.png 图像改成 image.jpg 之后,加载ok。...
2021-09-13 17:45:21
796
原创 ERROR: You appear to be running an X server; please exit X before installing
在linux版本下安装gpu版tensorflow,安装cuda_10.1.105_418.39_linux.run时,报错如下:ERROR: You appear to be running an X server; please exit X before installing查阅晚上资料,说是要关闭界面窗口,用文本模式来安装即可。1、$ sudo stop lightdm2、$ sudo init 33、$ chmod 777 cuda_10.1.105_418.39_linux.run4
2021-08-06 22:39:12
5374
原创 TypeError: Input ‘image‘ of ‘EncodeJpeg‘ Op has type float32 that does not match expected type of ui
用 tensorflow 处理图像的时候,运行如下代码:with tf.Session() as sess:# 解码图像img = tf.image.decode_jpeg(img)# 调整图片大小img = tf.image.convert_image_dtype(img, dtype=tf.float32)img = tf.image.resize_images(img, [400, 600], method=0)# 显示图像plt.imshow(img.eval())plt.show
2021-07-22 14:40:29
494
原创 error: OpenCV(4.5.2) C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-_8k9tw8n\opencv\modules\h
用opencv读取图片:image = cv2.imread(‘D:path1/1.jpg’)出现入下问题:error: OpenCV(4.5.2) C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-_8k9tw8n\opencv\modules\highgui\src\window.cpp:404: error: (-215:Assertion failed) size.width>0 && size.height>
2021-07-16 20:46:01
9560
5
原创 super(Extractor, self).__init__() TypeError: super(type, obj): obj must be an instance or subtype o
在训练一个基于tensorflow的图像目标检测程序,在修改了一个脚本以后,运行主程序,报错如下:super(Extractor, self).__init__()TypeError: super(type, obj): obj must be an instance or subtype of type脚本修改的地方,肯定没有问题,还是出现如上报错,很是奇怪。解决办法:关掉python编辑器,重启。解决。...
2021-07-02 10:38:35
745
原创 ResourceExhaustedError: OOM when allocating tensor with shape[25088,4096] and type float on
基于GPU版本tensorflow2.0模块训练VOC数据集时,出现如下问题:ResourceExhaustedError: OOM when allocating tensor with shape[25088,4096] and type float on经查阅资料,意思为显卡内存不足。分析原因是数据量过大导致。解决办法:将卷积层 Conv2 的卷积核个数大幅度削减之后,即可。...
2021-07-02 09:58:22
828
原创 ValueError: Variable bi-lstm/bidirectional_rnn/fw/lstm_cell/kernel already exists, disallowed.
tensorflow运行LSTM。执行 train.py 训练模型之后,准备用验证集测试test,报错如下:ValueError: Variable bi-lstm/bidirectional_rnn/fw/lstm_cell/kernel already exists, disallowed. Did you mean to set reuse=True or reuse=tf.AUTO_REUSE in VarScope? Originally defined at:参考如下俩资料:https:/
2021-04-21 10:32:37
445
原创 spyder程序改pycharm遇到问题
原来的spyder环境下程序路径如下:path = ‘F:a/b/c/’训练集、测试集数据文件data = read_csv(path + ‘d.csv’)在pycharm中显示报错。修改如下:path = ‘F:a/b/c/’训练集、测试集数据文件data = read_csv(path + ‘d.csv’)...
2021-03-24 16:10:28
318
原创 pyinstaller打包含有opencv的程序时,出现问题:cv2.error: OpenCV(4.4.0) resize.cpp:3929: error: (-215:Assertion fail
pyinstaller打包含有opencv的程序时,出现问题:cv2.error: OpenCV(4.4.0) resize.cpp:3929: error: (-215:Assertion failed) !ssize.empty() in function ‘cv::resize’多次尝试之后,重新打包,成功运行。经过两个方面处理:1、将原路径 path = ‘D:aaa/bbb’ 改成 path = ‘D:/aaa/bbb’2、将 cv2.imread(path+‘1.jpg’) 改成 cv2
2021-02-25 14:37:42
1986
原创 搭建ImagePy遇到问题
搭建ImagePy遇到问题在github上clone了ImagePy到自己电脑之后,用python -m imagepy启动时遇到如下问题:wx._core.wxAssertionError: C++ assertion "!flags & (wxALIGN_BOTTOM | wxALIGN_CENTRE_VERTICAL)) failed at …\src\common\sizer.cpp(2184 in wxBoxSIzzer::DoInsert(): Vertical alignment
2021-01-29 10:21:10
1360
3
原创 keras搭建卷积神经网络构建模型参数个数计算方式
keras搭建卷积神经网络构建模型参数个数计算方式计算过程(1)用一十二个333的卷积核对三通道图像1501503进行卷积。每一个卷积核有一个偏置。则此层参数个数为(333+1)12=336。(2)经过上面的操作,生成了一十二幅尺寸为1501501的图像。则用五个3312的卷积核对单通道图像1501501进行卷积。每个卷积核有一个偏置。此层参数的个数为(3312+1)5=545。(3)卷积...
2019-02-02 10:48:14
2966
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人