![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
keras
kahuifu
这个作者很懒,什么都没留下…
展开
-
ImportError: Could not import PIL.Image. The use of `array_to_img` requires PIL.Image
ImportError: Could not import PIL.Image. The use of load_image requires PIL解决办法:pip3 install pillow转载 2020-05-02 17:26:31 · 687 阅读 · 0 评论 -
AttributeError: ‘Model‘ object has no attribute ‘predict_classes‘
之前代码是有效的,在更换训练模型后出现提示错误:AttributeError: ‘Model’ object has no attribute ‘predict_classes’因为两次训练时,网络结构不同第一次用的网络是在model=Sequential()下添加模块的的方法,也就是所谓的顺序模型。Sequential class可以使用model.predict_classes()的方法来实现预测;第二次用的方法,是编写好网络结构后使用model=Model()综合起来的方法,也就是Model转载 2020-05-13 17:24:41 · 1408 阅读 · 0 评论 -
Keras.metrics中的accuracy总结
转载来源:https://zhuanlan.zhihu.com/p/952934401. 背景Accuracy(准确率)是机器学习中最简单的一种评价模型好坏的指标,每一个从事机器学习工作的人一定都使用过这个指标。没从事过机器学习的人大都也知道这个指标,比如你去向别人推销一款自己做出来的字符识别软件,人家一定会问你准确率是多少。准确率听起来简单,但不是所有人都能理解得透彻,本文将介绍Keras中accuracy(也适用于Tensorflow)的几个新“玩法”。2. Keras中的accuracy介绍K转载 2020-06-06 11:29:51 · 3727 阅读 · 0 评论 -
keras中的正则化(regularization)
使用正则化来减少模型的过拟合效果conv11 = Conv1D(filters = 8,kernel_size = 4, kernel_initializer = "he_uniform", strides = 1, padding = "same", use_bias = False, kernel_regularizer = regularizers.l2(0.0001))(inputs1)参考博客:https://blog.csdn.net/xovee/原创 2020-06-07 09:06:30 · 1997 阅读 · 0 评论