train.py: error: the following arguments are required: --dataset的解决办法

train.py: error: the following arguments are required: --dataset的解决办法

最近在跑别人程序的时候老是遇到这种错误:

usage: train.py [-h] --dataset DATASET [--batch_size BATCH_SIZE]
                [--test_batch_size TEST_BATCH_SIZE] [--direction DIRECTION]
                [--input_nc INPUT_NC] [--output_nc OUTPUT_NC] [--ngf NGF]
                [--ndf NDF] [--epoch_count EPOCH_COUNT] [--niter NITER]
                [--niter_decay NITER_DECAY] [--lr LR] [--lr_policy LR_POLICY]
                [--lr_decay_iters LR_DECAY_ITERS] [--beta1 BETA1] [--cuda]
                [--threads THREADS] [--seed SEED] [--lamb LAMB]
train.py: error: the following arguments are required: --dataset

解决方法:
进入终端
输入

python train.py --dataset facades --cuda

facades是训练图像的文件

第二种方法
在pycharm中添加参数–dataset facades --cuda即可

这篇文章有更详细的介绍:https://www.jianshu.com/p/5af851d18a36

你可能感兴趣的:(train.py: error: the following arguments are required: --dataset的解决办法)