尝试运行Tensorflow模型训练脚本时出现Zsh错误

时间:2020-07-19 07:18:01

标签: python tensorflow scripting command-line-arguments zsh

我正在尝试使用张量流中的以下存储库来训练CIFAR10的resnet模型:https://github.com/stanford-futuredata/dawn-bench-models/tree/master/tensorflow/CIFAR10/resnet。即使自述文件提到了tensorflow 1.2,我在尝试安装时还是得到了Could not find a version that satisfies the requirement tensorflow==1.2,所以我改用tensorflow 1.15。我也使用Python 3.7.6并在Mac上运行。当我尝试运行训练脚本resnet_main.py时:

python3 resnet/resnet_main.py --train_data_path=cifar10/data_batch* \
                            --log_root=/tmp/resnet_model \
                            --train_dir=/tmp/resnet_model/train \
                            --dataset='cifar10' 

我收到以下命令行错误:zsh: no matches found: --train_data_path=cifar10/data_batch*。我想这与*有关,尽管我不确定,也不确定解决方法。谢谢!

1 个答案:

答案 0 :(得分:0)

答案很简单,就是为所有文件路径添加单引号,例如--train_data_path='cifar10/data_batch*'