Deep-Learning-21-Examples icon indicating copy to clipboard operation
Deep-Learning-21-Examples copied to clipboard

mac Python3.7,在运行train_image_classifier.py这一步时,总是出现这个报错,是什么原因,该如何处理

Open PiseyYou opened this issue 6 years ago • 7 comments

Traceback (most recent call last): File "/Volumes/Working/download/Deep-Learning-21-Examples-master/chapter_3/slim/train_image_classifier.py", line 573, in tf.app.run() File "/usr/local/lib/python3.7/site-packages/tensorflow/python/platform/app.py", line 125, in run _sys.exit(main(argv)) File "/Volumes/Working/download/Deep-Learning-21-Examples-master/chapter_3/slim/train_image_classifier.py", line 382, in main raise ValueError('You must supply the dataset directory with --dataset_dir') ValueError: You must supply the dataset directory with --dataset_dir

PiseyYou avatar Mar 22 '19 06:03 PiseyYou

我的也是这样 怎么解决?

wl4135 avatar Jun 04 '19 07:06 wl4135

没有设置dataset_dir参数

jiashihuigithub avatar Jun 07 '19 07:06 jiashihuigithub

@jiashihuigithub dataset_dir参数参数怎么设置,我是按照书上的设置文件夹路径的。用的命令也是书上的。 python train_image_classifier.py
--train_dir=satellite/train_dir
--dataset_name=satellite
--dataset_split_name=train
--dataset_dir=satellite/data
--model_name=inception_v3
--checkpoint_path=satellite/pretrained/inception_v3.ckpt
--checkpoint_exclude_scopes=InceptionV3/Logits,InceptionV3/AuxLogits
--trainable_scopes=InceptionV3/Logits,InceptionV3/AuxLogits
--max_number_of_steps=100000
--batch_size=32
--learning_rate=0.001
--learning_rate_decay_type=fixed
--save_inerval_secs=300
--save_summaries_secs=2
--log_enery_n_steps=10
--optimizer=rmsprop
--weight_decay=0.00004

zhonglin516 avatar Jun 10 '19 02:06 zhonglin516

@hzy46

@jiashihuigithub dataset_dir参数参数怎么设置,我是按照书上的设置文件夹路径的。用的命令也是书上的。 python train_image_classifier.py --train_dir=satellite/train_dir --dataset_name=satellite --dataset_split_name=train --dataset_dir=satellite/data --model_name=inception_v3 --checkpoint_path=satellite/pretrained/inception_v3.ckpt --checkpoint_exclude_scopes=InceptionV3/Logits,InceptionV3/AuxLogits --trainable_scopes=InceptionV3/Logits,InceptionV3/AuxLogits --max_number_of_steps=100000 --batch_size=32 --learning_rate=0.001 --learning_rate_decay_type=fixed --save_inerval_secs=300 --save_summaries_secs=2 --log_enery_n_steps=10 --optimizer=rmsprop --weight_decay=0.00004

zhonglin516 avatar Jun 10 '19 02:06 zhonglin516

@jiashihuigithub dataset_dir参数参数怎么设置,我是按照书上的设置文件夹路径的。用的命令也是书上的。 python train_image_classifier.py --train_dir=satellite/train_dir --dataset_name=satellite --dataset_split_name=train --dataset_dir=satellite/data --model_name=inception_v3 --checkpoint_path=satellite/pretrained/inception_v3.ckpt --checkpoint_exclude_scopes=InceptionV3/Logits,InceptionV3/AuxLogits --trainable_scopes=InceptionV3/Logits,InceptionV3/AuxLogits --max_number_of_steps=100000 --batch_size=32 --learning_rate=0.001 --learning_rate_decay_type=fixed --save_inerval_secs=300 --save_summaries_secs=2 --log_enery_n_steps=10 --optimizer=rmsprop --weight_decay=0.00004

各个参数之间没有换行吧?有这个文件夹吧?

jiashihuigithub avatar Jun 10 '19 06:06 jiashihuigithub

@jiashihuigithub 命令跟书上的一样,文件夹也是按照书本上建的。 环境Ubuntu16.04 tensorflow-GPU 1.13.1. train_image_classifier.py代码要不要修改?

python train_image_classifier.py
--train_dir=satellite/train_dir
--dataset_name=satellite \
--dataset_split_name=train
--dataset_dir=satellite/data
--model_name=inception_v3
--checkpoint_path=satellite/pretrained/inception_v3.ckpt
--checkpoint_exclude_scopes=InceptionV3/Logits,InceptionV3/AuxLogits
--trainable_scopes=InceptionV3/Logits,InceptionV3/AuxLogits
--max_number_of_steps=100000
--batch_size=32
--learning_rate=0.001
--learning_rate_decay_type=fixed
--save_inerval_secs=300
--save_summaries_secs=2
--log_enery_n_steps=10
--optimizer=rmsprop
--weight_decay=0.00004

zhonglin516 avatar Jun 10 '19 07:06 zhonglin516

@jiashihuigithub dataset_dir参数参数怎么设置,我是按照书上的设置文件夹路径的。用的命令也是书上的。 python train_image_classifier.py --train_dir=satellite/train_dir --dataset_name=satellite --dataset_split_name=train --dataset_dir=satellite/data --model_name=inception_v3 --checkpoint_path=satellite/pretrained/inception_v3.ckpt --checkpoint_exclude_scopes=InceptionV3/Logits,InceptionV3/AuxLogits --trainable_scopes=InceptionV3/Logits,InceptionV3/AuxLogits --max_number_of_steps=100000 --batch_size=32 --learning_rate=0.001 --learning_rate_decay_type=fixed --save_inerval_secs=300 --save_summaries_secs=2 --log_enery_n_steps=10 --optimizer=rmsprop --weight_decay=0.00004

各个参数之间没有换行吧?有这个文件夹吧?

这些命令要在哪里输入呢?

hehe771 avatar Feb 16 '21 05:02 hehe771