博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
TypeError: check_anchors() missing 1 required positional argument: ‘model‘解决记录
阅读量:3973 次
发布时间:2019-05-24

本文共 467 字,大约阅读时间需要 1 分钟。

1、报错:

Traceback (most recent call last):  File "train.py", line 673, in 
train(hyp, opt, device, tb_writer) File "train.py", line 247, in train check_anchors(model)TypeError: check_anchors() missing 1 required positional argument: 'model'

2、分析原因

1)在建立对象时少了括号

2)check_anchors(model),与定义check_anchors参数不匹配

3、解决方案

仔细检查没有落下括号,发现调用函数check_anchors与定义的def check_anchors(dataset, model, thr=4.0, imgsz=640)函数参数不匹配,更改为 check_anchors(dataset, model),运行,问题得以解决。

转载地址:http://brtki.baihongyu.com/

你可能感兴趣的文章
BIRT的文档生成,渲染技术
查看>>
Class.forName() 初始化、Thread.currentThread().getContextClassLoader().getResourceAsStream
查看>>
spring 错误(org.springframework.beans.NotWritablePropertyException)依赖注入配置
查看>>
BIRT使用ScriptDataSet从POJO中获得数据
查看>>
JSP传参数给Birt的两种方法
查看>>
birt学习笔记(连载)
查看>>
理解Birt中API
查看>>
MyEclipse SVN 修改用户名和密码
查看>>
BIRT报表技术
查看>>
birt标签的使用
查看>>
给birt的表格添加表格线
查看>>
BIRT Viewer 2.2 参数设置详解
查看>>
开发Birt过程中遇到的两个困扰我很久的问题?
查看>>
时间格式及关于时间的操作(SimpleDateFormat)
查看>>
解决JAVA switch case 里面case A, A不能为 变量的问题
查看>>
两种Java容器类List和Set分析
查看>>
迭代器的介绍和使用
查看>>
J2EE开发常用开源项目名词解释
查看>>
js的导出Excel,Word,pdf的实现以及服务器端生成pdf的实现
查看>>
itext学习笔记
查看>>