hzy46 / Deep-Learning-21-Examples

《21个项目玩转深度学习———基于TensorFlow的实践详解》配套代码
4.51k stars 1.76k forks source link

第三章的训练那里出现报错 该怎么解决? #80

Open wl4135 opened 5 years ago

wl4135 commented 5 years ago

If you depend on functionality not listed there, please file an issue.

Traceback (most recent call last): File "E:/TensorFlowfightGoogle/21project/chapter_3/slim/train_image_classifier.py", line 574, in tf.app.run() File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run _sys.exit(main(argv)) File "E:/TensorFlowfightGoogle/21project/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

Process finished with exit code 1

karlyf commented 4 years ago

运行时没设参数

huangzy97 commented 4 years ago

按照书上的方法加参数运行还是报错 ERROR:tensorflow:================================== Object was never used (type <class 'tensorflow.python.framework.ops.Tensor'>): <tf.Tensor 'init_ops/report_uninitialized_variables/boolean_mask/GatherV2:0' shape=(?,) dtype=string> If you want to mark it as used call its "mark_used()" method. It was originally created here: File "train_image_classifier.py", line 573, in tf.app.run() File "E:\anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run _sys.exit(main(argv)) File "train_image_classifier.py", line 569, in main sync_optimizer=optimizer if FLAGS.sync_replicas else None) File "E:\anaconda3\lib\site-packages\tensorflow\contrib\slim\python\slim\learning.py", line 791, in train should_retry = True File "E:\anaconda3\lib\site-packages\tensorflow\python\util\tf_should_use.py", line 193, in wrapped return _add_should_use_warning(fn(*args, **kwargs))

hehe771 commented 3 years ago

运行时没设参数

请问书上给的命令应该在哪里运行呢?