typeerror: __init__() missing 2 required positional arguments: 'inputs' and 'outputs'
1 问题描述
使用下边这条命令去检查 TensorFlow Object Detection API是否正确安装:
python object_detection\builders\model_builder_test.py
报如下错误:
typeerror: __init__() missing 2 required positional arguments: 'inputs' and 'outputs'
2 解决
原因分析:
使用的models这个repository与当前版本的tensorflow不兼容(1.6.0)。
解决办法:
github上有人说,使用models是r1.5并且tensorflow版本是1.4.0可以解决。
由于我的是1.6,若想降级到1.4,还需要将cuda进行降级,比较麻烦。(没有尝试)
后来又看到有人将tensorflow的版本升级到1.8.0,问题也得到了解决。经过我的实践,确实可以!!!
typeerror: __init__() missing 2 required positional arguments: 'inputs' and 'outputs'的更多相关文章
- python3.5安装pyHook,解决【TypeError: MouseSwitch() missing 8 required positional arguments: 'msg', 'x', 'y', 'data', 'time', 'hwnd', and 'window_name'】这个错误!
为什么安装 pyHook包:为Windows中的全局鼠标和键盘事件提供回调. Python应用程序为用户输入事件注册事件处理程序,例如鼠标左键,鼠标左键,键盘键等 先要实时获取系统的鼠标位置或者键盘输 ...
- Django关联数据库时报错TypeError: __init__() missing 1 required positional argument: 'on_delete'
sgrade = models.ForeignKey("Grades",) 执行python manage.py makemigrations后出现TypeError: __ini ...
- Django问题 TypeError: __init__() missing 1 required positional argument: 'on_delete'
问题:在执行python manage.py makemigrations learning_logs时,系统会报错,提示:TypeError: __init__() missing 1 requir ...
- 执行python manage.py makemigrations时报错TypeError: __init__() missing 1 required positional argument: 'on_delete'
在执行python manage.py makemigrations时报错: TypeError: __init__() missing 1 required positional argument: ...
- Django :执行 python manage.py makemigrations 时报错 TypeError: __init__() missing 1 required positional argument: 'on_delete'
原因 执行命令 python manage.py makemigrations 报错 TypeError: __init__() missing 1 required positional argum ...
- python进行数据库迁移的时候显示(TypeError: __init__() missing 1 required positional argument: 'on_delete')
进行数据库迁移的时候,显示 TypeError: __init__() missing 1 required positional argument: 'on_delete' 图示: 出现原因: 在 ...
- TypeError: __init__() missing 1 required positional argument: 'on_delete'
报错的原因呢,就是在设计model时我弄了个外键,然后就报错了... 不难看出,它是想让我们在表与表关联时添加一个on_delete参数 解决办法: 如其所愿,加上on_delete=models.C ...
- 解决TypeError: __init__() missing 1 required positional argument: 'on_delete'
试用Djiango的时候发现执行mange.py makemigrations 和 migrate是会报错,少位置参数on_delete,查了一下是因为指定外键的方式不对,改一下就OK了. 代码如下: ...
- 【python3】 django2.0 在生成数据库表时报错: TypeError: __init__() missing 1 required positional argument: 'on_delete'
python: 3.6.4 django: 2.0 models.py 代码如下 # coding: utf-8 from django.db import models from django.co ...
随机推荐
- 2019 hdu多校1
A:一类线性dp,时间卡的有点紧 /* 定义 dp[t][i][j][k]代表填完前 t 个位置后,{0, 1, 2, 3} 这 4 个数字最后一次出现的位置, 排序后为 t, i, j, k(t & ...
- NX二次开发-UFUN获取一个图层类别的tag UF_LAYER_ask_category_tag
NX11+VS2013 #include <uf.h> #include <uf_ui.h> #include <uf_layer.h> UF_initialize ...
- AtCoder ABC 132F Small Products
题目链接:https://atcoder.jp/contests/abc132/tasks/abc132_f 题目大意 分析 代码如下
- jquery操作html元素之( 尺寸)
jQuery 提供多个处理尺寸的重要方法: width() height() innerWidth() innerHeight() outerWidth() outerHeight() jQuery ...
- USACO2007 捕牛记 /// queue+桶 oj1503
题目大意: John和牛都站在一条直线上,开始时John位于坐标点N上( 0 ≤ N ≤ 100,000 ),牛位于坐标点K上( 0 ≤ K ≤ 100,000 ). John有两种行动方式:步行和瞬 ...
- 312. 戳气球【困难】【区间DP】
题目链接 有 n 个气球,编号为0 到 n-1,每个气球上都标有一个数字,这些数字存在数组 nums 中. 现在要求你戳破所有的气球.每当你戳破一个气球 i 时,你可以获得 nums[left] * ...
- 【noi.ac-CSP-S全国模拟赛第三场】#705. mmt
给定数组a[],b[] 求$$c_i=\sum_{j=1}^{i} a_{\left \lfloor \frac{n}{j} \right \rfloor}·b_{i \bmod j}$$ 大概就是对 ...
- 从零开始:Mysql基于Amoeba的集群搭建
从零开始:Mysql基于Amoeba的集群搭建 准备环境 1.mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz 2.amoeba-mysql-binary-2.0. ...
- vagrant centos lamp小记
更新包 sudo yum -y update vagrant centos 默认语言好像是德语,看不懂,需要更换为 en_US [vagrant@localhost ~]$ locale LANG=d ...
- python中与time模块和datetime模块相关操作
使用time模块计时程序运行时长 import time time_start = time.time() #程序主体部分 time_end = time.time() print('总耗时: ', ...