这不是少了一个包,而是少了一个VGG预训练的脚本文件,要专门去找到并下载,而不能pip或者import

感谢github的大佬分享,在以下链接中可以下载vgg_preprocess.py放置到对应路径

https://github.com/tensorflow/models/tree/master/research/slim/preprocessing

不过这个是tensorflow2版本使用的,如果tensor1想正常运行的话需要将vgg_preprocessing.py文件里的相应文字删除,不然会报“No module named 'tensorflow.compat'”的错误

用记事本打开vgg_preprocessing.py文件,找到以下这一行并修改:

改为:

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐