![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
报错解决
In year
用知识认识更多的人!
展开
-
吴恩达course4week3中报错大全No module named“xxx”,“xxx” has no attribute“xxx”
这个代码是TensorFlow2.x的包使用1.x的方法,因为在我学习过程中,课后编程作业是以TensorFlow1.x为背景进行学习的,而我安装TensorFlow包则是2.x。方法已经被移除,而且 Keras 完全集成了 TensorFlow 2.x 的会话管理,可以通过TensorFlow获取会话。根据自己的错误报错信息,找到代码位置进行更改。原因:安装了高版本的keras库。原因:安装了高版本的keras库。原因:安装了高版本的keras库。原因:在新版本的Keras中。原创 2023-09-23 19:40:25 · 443 阅读 · 3 评论 -
nvalid value for --gpu-architecture (-arch)
使用gpu运行深度学习代码时,遇到这个错误。官网,下载对应CUDA版本的pytorch。与cuda驱动的版本有关。2.查看CUDA版本。原创 2024-04-16 20:42:12 · 352 阅读 · 0 评论 -
module ‘tensorflow‘ has no attribute ‘xxxx‘
module‘TensorFlow’ has no attribute ‘xxx’原创 2023-09-14 16:11:15 · 45 阅读 · 1 评论 -
tf.placeholder() is not compatible with eager execution.
TensorFlow 2.x 中的函数,用于在 Eager Execution 模式下切换回 TensorFlow 1.x 的图执行模式。解决办法2:在调用创建占位符函数时添加以下代码。原创 2023-09-16 11:39:16 · 1951 阅读 · 1 评论 -
utf-8 codec can t decode bytes in position 24-25: invalid continuation byte
路径问题原创 2023-09-23 20:28:08 · 149 阅读 · 2 评论 -
解决 idea配置tomcat时没有artifacts(导入web项目配置Tomcat常见问题)
解决idea配置Tomcat没有Artifacts(导入web项目配置tomcat常见问题)原创 2023-02-22 11:54:05 · 1659 阅读 · 0 评论 -
module ‘tensorflow.compat.v1‘ has no attribute ‘contrib‘在TensorFlow中不能进行初始化
解决办法:使用tf.keras.initializers.glorot_uniform进行初始化。原因:TensorFlowv2.xx版本移除了。原创 2023-09-15 14:11:09 · 274 阅读 · 0 评论 -
bad marshal data (unknown type code)
bad marshal data (unknown type code),吴恩达深度学习课程4第三周作业原创 2023-09-24 02:45:00 · 540 阅读 · 6 评论 -
name ‘plot_model‘ is not defined
plot_model 是 Keras 的一个功能,用于可视化深度学习模型的结构。解决方法:导入正确的库和模块。原创 2023-09-21 01:00:00 · 225 阅读 · 0 评论 -
cannot import name ‘layer_utils‘ from ‘keras.utils‘
【代码】cannot import name ‘layer_utils‘ from ‘keras.utils‘原创 2023-09-18 18:55:47 · 845 阅读 · 0 评论 -
scipy.misc is deprecated and has no attribute imread.
imread 函数已被弃用(deprecated),不再可用。imread 通常用于读取图像文件,但在较新的 SciPy 版本中已被移除。原创 2023-09-20 20:37:27 · 1239 阅读 · 0 评论 -
name ‘preprocess_input‘ is not defined
preprocess_input 通常是一个在深度学习中用于预处理图像数据的函数,它的定义通常包含在深度学习框架的库或模型中。这个函数用于对图像数据进行标准化和归一化,以使其适合输入到深度神经网络模型中。原创 2023-09-20 18:07:58 · 373 阅读 · 0 评论 -
在使用jupyter notebook进行可视化化时,遇到内核死亡的问题
使用jupyter notebook可视化遇到的问题原创 2023-04-13 10:58:23 · 111 阅读 · 0 评论 -
springboot项目启动报错:Error creating bean with name tomcatServletWebServerFactory
【代码】springboot项目启动报错:Error creating bean with name tomcatServletWebServerFactory。原创 2023-05-15 12:42:34 · 1461 阅读 · 0 评论 -
沐神深度学习报错 can only concatenate str (not “int“) to str
动手学深度学习第二章数据预处理中报错: can only concatenate str (not “int”) to str。panda新版本对fillna函数做了调整,原先是忽略str。原创 2023-11-18 10:00:00 · 406 阅读 · 2 评论 -
module ‘d2l.torch‘ has no attribute ‘train_ch3‘
再下载新的版本,需要以管理员身份运行下载指令。我是韩一,用知识认识更多的人,欢迎大家指正!如果没有安装d2l,请安装 详细步骤见。原创 2023-11-24 21:09:20 · 1129 阅读 · 4 评论 -
Exception encountered when calling layer “tf.math.multiply_4“ (type TFOpLambda).
原因:维度不匹配不能乘,需要将参数更换顺序。原创 2023-09-24 21:51:06 · 626 阅读 · 0 评论 -
关于python中内存分配的问题,运行一些操作可能会导致为新结果分配内存,用Python的id()函数演示
在机器学习中,我们可能有数百兆的参数,并且在一秒内多次更新所有参数。一般在python中不会考虑像C++中的内存问题,但是在一些高级应用中会考虑,例如有一个特别特别大的矩阵,最好不要不断的赋值,导致内存问题产生。1.有如下代码:Y的 id 存在变量before中,把Y+X在赋值为Y(相当于又创建了一次Y),这个Y的 id 和之前Y的 id 是不相同的。函数, 它给我们提供了内存中引用对象的确切地址,这个id就像C++中的指针,id在python中表示object的唯一标识号。在python中有个。原创 2023-11-17 20:37:42 · 117 阅读 · 0 评论 -
threshold must be numeric and non-NAN, try sys.maxsize for untruncated representation(吴恩达第四周作业1)
numpy版本的错误使用。原创 2023-10-05 15:38:17 · 87 阅读 · 0 评论 -
python3.6 os.makedirs() 和 os.mkdir() 用法【windows中】
os.mkdir() 用于创建单个目录 ,要确保目标文件的父级目录存在,例如,如果指定的路径是 dir1/dir2/dir3,但 dir1 或 dir1/dir2 不存在,os.mkdir() 会报错。os.makedirs() 用于创建多层目录,例如,如果指定的路径是 dir1/dir2/dir3,但 dir1 或 dir1/dir2 不存在,os.makedirs() 会自动创建这些不存在的目录。相同点:都是 Python 中用于创建目录的函数。原创 2024-01-28 10:20:19 · 778 阅读 · 0 评论 -
import cPickle as pkl报错ImportError
报错原因:在 Python 3.x 版本中,cPickle 已经被移除。在python2.X版本中使用。在python3.X版本使用。原创 2024-01-25 17:36:11 · 376 阅读 · 0 评论 -
CondaError: Downloaded bytes did not match Content-Length
清华:https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/win-64/阿里:http://mirrors.aliyun.com/anaconda/cloud/pytorch/win-64/conda安装包的时候下载的包的长度不够用,导致安装失败,常常是超时。原创 2024-01-05 14:39:01 · 818 阅读 · 0 评论 -
OSError: [WinError 1455] 页面文件太小,无法完成操作。 Error loading E:\software\Anaconda\envs\MFA-LR\lib\site-pack
虚拟内存别称虚拟存储器(Virtual Memory)。电脑中所运行的程序均需经由内存执行,若执行的程序占用内存很大或很多,则会导致内存消耗殆尽。1.页面文件太小,所以需要调大页面文件的大小,conda环境在哪个盘下面,就扩大哪个盘的虚拟内存。将代码中的Dataloader中的参数num_workers为0。一般在加载数据的地方。1.找到我的电脑右击属性,点击高级系统设置。2.数据加载的子进程数量有点大。3.高级——>程序——>更改。原创 2024-01-27 21:57:43 · 851 阅读 · 0 评论 -
Creating an ndarray from ragged nested sequences
这个警告意味着你正在尝试从不规则的嵌套序列(例如列表或元组)创建一个 ndarray,而这些嵌套序列的子序列具有不同的长度或形状。在 NumPy 中,这种行为已被弃用,因为它可能导致不一致的行为和意外结果。如果你确实需要创建一个包含不同长度或形状的子序列的数组,你可以将 dtype 参数设置为 object。这将创建一个包含 Python 对象的数组,这些对象可以是任何类型,包括列表、元组或其他数组。原创 2024-03-11 11:18:03 · 358 阅读 · 0 评论 -
import tensorflow.contrib.slim as slim中contrib报红,显示没有导入contrib
找到包的位置,查看tensorflow中是否下载了contrib包,如果有的话,建议重新装一次TensorFlow。(当然也可以将contrib复制到tensorflow文件夹下面,不修改原来代码)我的在tensorflow_estimator下。如果没有找找,可以在搜索栏搜一下在哪。原创 2024-01-25 21:12:12 · 410 阅读 · 0 评论 -
Authorization Failed You can close this page and return to the IDE
注册JetBrains成功,并且通过了学生认证,但在activate pycharm时,却显示Authorization Failed You can close this page and return to the IDE如上图。4.鼠标右击用记事本打开hosts,删除以下内容,删除之后,保存时,可能存在权限问题,如果不能顺利保存,请参见。2.找到JeBrains文件夹,在AppData下面,将JeBrains文件夹删除。我是韩一,用知识认识更多的人,欢迎大家指正!5.重新激活即可成功。原创 2024-01-24 17:46:44 · 922 阅读 · 1 评论 -
解决layui中限定日期的问题(模板中不能限定当前系统之后的时间)
解决layui中限定日期的问题(模板中不能限定当前系统之后的时间)原创 2023-02-17 22:01:23 · 336 阅读 · 0 评论 -
未预期的符号“(”附近有语法错误
解决方法:在()前面增加转义符号“ \ ”,这样才能顺利执行。原因:没有准确识别‘()’,需要通过转义字符。原创 2024-03-13 12:06:46 · 1109 阅读 · 0 评论