当前位置:网站首页>深度学习训练和测试时出现问题: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的方法,即训练文件的配置方法和测试文件的配置方法,希望我总结的方法能帮助到你,谢谢!
边栏推荐
- What are runtimecompiler and runtimeonly
- What if Oracle 19C migration encounters large lob tables?
- How to use kotlin flow in Android projects
- CTF Crypto---RSA KCS1_OAEP模式
- BOM概述
- [computer explanation] what should I pay attention to when I go to the computer repair shop to repair the computer?
- 【程序员2公务员】四、常见问题
- 各位老板 问一下 就是我们mysql cdc保存的是配置数据 然后kafka里面堆积的有历史
- 30 times performance improvement -- implementation of MyTT index library based on dolphin DB
- Huawei wireless device sta black and white list configuration command
猜你喜欢

论文阅读:UNET 3+: A FULL-SCALE CONNECTED UNET FOR MEDICAL IMAGE SEGMENTATION

RPC communication principle and project technology selection

9大最佳工程施工项目管理系统

Matlab self programming series (1) -- angular distribution function

leetcode刷题:动态规划06(整数拆分)

Introduction to Manhattan distance

BOM overview

NLP hotspots from ACL 2022 onsite experience

list的模拟实现

Paper reading: UNET 3+: a full-scale connected UNET for medical image segmentation
随机推荐
集群聊天服务器:项目问题汇总
cesium简介
从ACL 2022 Onsite经历看NLP热点
微信小程序switchTab传参以及接收参数
华为无线设备配置WAPI-证书安全策略
What are the types of financial products in 2022? Which is suitable for beginners?
各位老板 问一下 就是我们mysql cdc保存的是配置数据 然后kafka里面堆积的有历史
Introduction to cesium
Beijing internal promotion | Microsoft STCA recruits nlp/ir/dl research interns (remote)
New functions of shixizhi are online. These new functions are online in June. Can you use them?
做好项目管理的10个关键点和5大措施
QT6 with vs Code: compiling source code and basic configuration
How to use network installation to deploy multiple virtual servers in KVM environment
Robot framework mobile terminal Automation Test ----- 01 environment installation
Price reduction, game, bitterness, etc., vc/pe rushed to queue up and quit in 2022
Alibaba cloud image address & Netease cloud image
曼哈顿距离简介
The application of for loop and if judgment statement
On the peak night of the 8 Oracle ace gathering, what technology hotspots did you talk about?
Day by day, month by month | Shenzhen potential technology released the extreme accelerated version of molecular docking engine uni docking