TypeError: _obtain_input_shape() got an unexpected keyword argument 'include_top'
原文链接:http://www.one2know.cn/bug9/
- 报错
Traceback (most recent call last):
File "D:/PyCharm 5.0.3/WorkSpace/3.Keras/2.Application中五款已训练模型、VGG16框架(Sequential式、Model式)解读/2.py", line 159, in <module>
model = VGG16(include_top=True, weights='imagenet')
File "D:/PyCharm 5.0.3/WorkSpace/3.Keras/2.Application中五款已训练模型、VGG16框架(Sequential式、Model式)解读/2.py", line 51, in VGG16
include_top=include_top)
TypeError: _obtain_input_shape() got an unexpected keyword argument 'include_top'
- 原因
没有叫include_top的参数 - 解决
打开keras.applications.imagenet_utils找到preprocess_input()函数,def _obtain_input_shape(input_shape, default_size, min_size, data_format, require_flatten, weights=None):
将参数include_top改成require_flatten
TypeError: _obtain_input_shape() got an unexpected keyword argument 'include_top'的更多相关文章
- TypeError: parse() got an unexpected keyword argument 'transport_encoding'
错误: TypeError: parse() got an unexpected keyword argument 'transport_encoding'You are using pip vers ...
- TypeError: __init__() got an unexpected keyword argument 't_command'
python .\manage.py migrate 报错如下 λ python .\manage.py migrateTraceback (most recent call last): File ...
- TypeError: while_loop() got an unexpected keyword argument 'maximum_iterations'
错误: TypeError: while_loop() got an unexpected keyword argument 'maximum_iterations' 参照https://blog.c ...
- TypeError: to_categorical() got an unexpected keyword argument 'nb_classes'
在学习莫烦教程中keras教程时,报错:TypeError: to_categorical() got an unexpected keyword argument 'nb_classes',代码如下 ...
- TypeError: pivot_table() got an unexpected keyword argument 'rows'
利用Python进行数据分析>第二章,处理MovieLens 1M数据集,有句代码总是报错: mean_rating = data.pivot_table('rating', rows='tit ...
- TypeError: parse() got an unexpected keyword argument 'transport_encoding' 安装tensor后报错
TypeError: parse() got an unexpected keyword argument 'transport_encoding' 巨蛋疼,出这个问题后,老夫真是醉了,mmp,最后在 ...
- Python pika, TypeError: exchange_declare() got an unexpected keyword argument 'type' 问题修复
网上很多写法都是 type='fanout' 这样的.(这里是基于python=3.6版本, pika=0.13.0 版本) credentials = pika.PlainCredentials(' ...
- Django TypeError: render() got an unexpected keyword argument 'renderer'
场景: Xadmin添加plugin 来源: 1. xadmin与DjangoUeditor的安装 (第3.3章节) 2. 增加富文本编辑器Ueditor (第14.7章节) 报错: Django T ...
- TypeError: __init__() got an unexpected keyword argument 'serialized_options'
问题描述: TypeError: __init__() got an unexpected keyword argument 'serialized_options' File "objec ...
随机推荐
- [填坑] ubuntu检测不到外接显示器
笔记本是win10+ubuntu18双系统,今天ubuntu(开启nivida独显状态)突然无法连外接屏幕,但切换win10就可以显示. 贴吧找到的简单解决方法,不需要重装驱动,记录分享在这里: su ...
- JSP第一章动态网页的基础
什么是动态网站(dynamic website)? 动态网站: 误区:初学者一般认为动态网页,就是会动的网页,但实际上不是这样的. 动态网页是指在服务器端运行的,使用程序语言设计的交互式网页,它们会根 ...
- 在eclipse中创建Web项目中没有web.xml的解决方法
右键点击项目 → “Java EE Tool” → “Generate Deployment descriptor stub” 即可生成web.xml文件
- &= 的含义
这是一个缩略式子,展开之后的结果是a = a & b;&是按位与的操作符. 按位与运算:参加运算的两个数据,按二进位进行“与”运算.如果两个相应的二进位都为1,则该位的结果值为1,否则 ...
- WPF ContextMenu+VisualTreeHelper实现删除控件操作
<UserControl MouseRightButtonDown="UserControl_MouseRightButtonDown" > <UserC ...
- Leetcode的SQL题解:185. 部门工资前三高的员工
题目 查询部门工资前三高的员工. 我用的数据库是oracle. 下面是数据表的信息. Employee表数据: | ID | NAME | Salary | DepartmentId | | -- | ...
- Jquery.form异步上传文件常见问题解决
Jquery.form常用方法我就不多说,主要说一下在使用过程中碰到的问题 1.提示 “xxxx” is not define 或者"xxx" is not a function ...
- 2019中山纪念中学夏令营-Day9[JZOJ](第六次模拟赛)
Begin (题目的排序方式:Unkown其实是按心情排的) 异或:(摘自百度百科) 异或(xor)是一个数学运算符.它应用于逻辑运算.异或的数学符号为“⊕”,计算机符号为“xor”.其运算法则为: ...
- SpringBoot第一天
一,SpringBoot 介绍 1,如果使用 Spring 开发一个"HelloWorld"的 web 应用: • 创建一个 web 项目并且导入相关 jar 包.SpringMV ...
- 如何编写一个WebPack的插件原理及实践
_ 阅读目录 一:webpack插件的基本原理 二:理解 Compiler对象 和 Compilation 对象 三:插件中常用的API 四:编写插件实战 回到顶部 一:webpack插件的基本原理 ...