![](https://img-blog.csdnimg.cn/20190927151026427.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
Debug
code debug
despacito,
世间美好与你环环相扣。
展开
-
ModuleNotFoundError: No module named ‘tensorflow‘
在确定CUDA、cuDNN版本都对的情况下发生上述错误,原因可能是python和tensorflow-gpu的版本不匹配。明明已经安装了tensorflow-gpu 2.5版本,import tensorflow as tf 还是报错。conda install tensorflow-gpu(指定版本==2.6.0)conda create -n tensorflow-gpu(环境名)原创 2023-02-22 21:41:46 · 664 阅读 · 0 评论 -
500 : Internal Server Error
python和tensorflow-gpu的版本不匹配,创建不带python的环境,安装tensorflow的时候,会自动匹配对应版本的python。安装完tensorflow-gpu环境后,打开jupyter notebook, 在进入ipynb文件时报错误。conda install tensorflow-gpu(指定版本==2.6.0)conda create -n tensorflow-gpu(环境名)原创 2023-02-22 21:40:18 · 350 阅读 · 2 评论 -
关于 ValueError: (‘Label (…) not present in mask. Choose from […]’
pyradiomic,特征提取,image和mask.原创 2022-08-18 16:29:01 · 1982 阅读 · 0 评论 -
ValueError: No model found in config file. 解决办法
代码段:from tensorflow.keras.models import load_modelmodel_path = 'vgg16_weights_tf_dim_ordering_tf_kernels.h5'model_vgg = load_model(model_path)报错信息:背景知识:"""模型保存方式:save()→保存模型参数和网络结构、损失函数、优化器save_weights()→仅保存模型参数,可以看作是保存模型的一部分。"""#方式1.原创 2022-04-08 16:33:55 · 3235 阅读 · 3 评论 -
Jupyter notebook:由于GPU内存不足的原因,可能导致的错误提示
1、Failed to get convolution algorithm. This is probably because cuDNN failed2、tensorflow:OOM when allocating tensor with shape[225,256,256,36] and type float on /job:localhost/re解决办法:1.减少卷积核的数量2.减小输入图像的尺寸3.关闭Jupyter notebook,重新打开。...原创 2020-05-26 15:17:50 · 2204 阅读 · 0 评论 -
Dimension 1 in both shapes must be equal, but are 50 and 49. Shapes are [?,50,50] and [?,49,49].
一、报错截图:二、源代码:三、修改后:加一行和一列值为0的像素,使其在拼接的时候,每个通道的行和列相等。三、程序正常运行:原创 2020-01-01 22:05:23 · 1008 阅读 · 0 评论 -
TypeError:only integer scalar arrays can be converted to a scalar index.[Python Code ]
一、报错截图:二、定位出错的代码:def test_batch(path): model = Model() model.load() index = 0 img_list, label_list, counter = read_file(path) # print(img_list.shape[1:]) for img in img_...原创 2019-12-04 21:14:17 · 10353 阅读 · 0 评论 -
cannot reshape array of size 541 into shape (541,580,775,1)问题解决!
一、报错截图:二、分析原因:ValueError可知,我们的数据格式可能有问题,这里需要shape一下我们的数据,看一下数据的大小是否一致。# 将数据集打乱随机分组x_train, x_test, y_train, y_test = train_test_split(imgs, ...原创 2019-11-27 21:46:11 · 8175 阅读 · 0 评论 -
python pandas 报错 'Series' object has no attribute 'reshape'
报错的代码部分:sample = X_train.iloc[10, :]sample = sample.reshape([28, 28])plt.imshow(sample, cmap='gray')将:sample = sample.reshape([28, 28])改为:sample = sample.values.reshape([28, 28])...原创 2019-11-17 17:29:57 · 3354 阅读 · 0 评论 -
Padre中不能显示中文的解决办法。
一、在Perl代码前加上如下代码,Perl脚本中的的汉字即可被输出。#use utf8表示代码使用UTF-8写的#use encoding 'utf-8'表示你的运行环境,如buffer、IO等 都是UTF-8#use utf8;use encoding 'utf8',STDOUT => 'gb2312';解释:use encoding 'utf8', STDIN=>...原创 2019-10-30 18:21:04 · 356 阅读 · 0 评论 -
卷积神经网络部分,每训练到一定步就报错,什么原因?
import tensorflow as tfimport osimport pickleimport numpy as np CIFAR_DIR = "C:/Users/tianr/Desktop/cifar-10-batches-py"print(os.listdir(CIFAR_DIR)) def load_data(filename): """read data ...原创 2019-09-03 15:29:00 · 2035 阅读 · 5 评论