当前位置:网站首页>深度学习训练和测试时出现问题:error: the following arguments are required: --dataroot,解决:训练文件的配置方法和测试文件的配置方法
深度学习训练和测试时出现问题:error: the following arguments are required: --dataroot,解决:训练文件的配置方法和测试文件的配置方法
2022-07-25 07:24:00 【佐咖】
在深度学习训练和测试时出现问题:error: the following arguments are required: --dataroot,出现这种问题的主要原因是,训练的配置文件和测试的配置文件有问题,具体解决方法见下。
1、配置训练文件
在正式训练前,需要在编译软件中配置训练文件,我这里提供的配置方法是在Pycharm编译软件中,其它编译软件的配置方法也类似,具体配置方法见下:
(1)先运行一下train.py文件,这时候会报错提示,提示需要配置训练文件,如下:

报错的提示如下:error: the following arguments are required: --dataroot

(2)打开Run的下拉菜单,点击Edit Configurations,如下:


如上图所示,在打开的编辑框中输入如下命令后点击OK即可添加好训练配置文件:

2、开始训练
上面步骤都准备好后在Terminal控制台中输入下面命令回车就开始训练了,如下:
python train.py --dataroot ./datasets/horse2zebra --name horse2zebra_cyclegan --model cycle_gan

回车后下面这种样纸的情况,就说明在正常训练了:

3、配置测试文件
同样类似上面的方法,配置测试文件,先运行以下test.py文件,同样也会报错提示,如下:


开始配置测试文件:



4、开始测试
在Terminal控制台中输入以下命令,并回车就开始测试了,如下:
python test.py --dataroot datasets/horse2zebra/testA --name horse2zebra_pretrained --model test --no_dropout

出现下面的样纸时就说明测试完成了,见下:
以上就是解决深度学习训练和测试时出现问题:error: the following arguments are required: --dataroot的方法,即训练文件的配置方法和测试文件的配置方法,希望我总结的方法能帮助到你,谢谢!
边栏推荐
- scrapy定时爬虫的思路
- Luo min's backwater battle in qudian
- Ideal L9, can't cross a pit on the road?
- 3. Promise
- Paddlepaddle 34 adjust the layer structure and forward process of the model (realize the addition, deletion, modification and forward modification of the layer)
- js无法获取headers中Content-Disposition
- 做好项目管理的10个关键点和5大措施
- The idea of the regular crawler of the scratch
- Rust标准库-实现一个TCP服务、Rust使用套接字
- 第一启富金怎么样
猜你喜欢
随机推荐
Beijing internal promotion | Microsoft STCA recruits nlp/ir/dl research interns (remote)
10 key points and 5 measures for good project management
数据提交类型 Request Payload 与 Form Data 的区别总结
Default value of dart variable
微信小程序request请求携带cookie,验证是否已登录
Scavenging vultures or woodpeckers? How to correctly understand short selling
3. Promise
About --skip networking in gbase 8A
QT学习日记20——飞机大战项目
Robot Framework移动端自动化测试----01环境安装
Xinku online | cnopendata shareholder information data of A-share listed companies
How to do a good job in safety development?
[programmer 2 Civil Servant] summary of some common problems about system research
Summary of differences between data submission type request payload and form data
Introduction to cesium
【程序员2公务员】四、常见问题
Offline base tile, which can be used for cesium loading
Summary of learning notes of deep learning application development (II)
list的模拟实现
What if Oracle 19C migration encounters large lob tables?









