1.打包上传文件到oss后,找不到指定文件夹下的相关模块(实际是存在的):
Traceback (most recent call last):
File "Faster-RCNN/train.py", line 8, in <module>
import lib.datasets.roidb as rdl_roidb
ImportError: No module named datasets.roidb
解决方案:在datasets文件夹下创建空__init__.py文件
2.运用os.system函数执行多个py文件时,找不到相关文件
python: can't open file 'prepare_data/gen_hard_bbox_pnet.py': [Errno 2] No such file or directory
python: can't open file 'prepare_data/gen_landmark_aug.py': [Errno 2] No such file or directory
python: can't open file 'prepare_data/gen_tfrecords.py': [Errno 2] No such file or directory
python: can't open file 'training/train.py': [Errno 2] No such file or directory
解决方法:要使用全路径
os.system("python mtcnn_tf-master/prepare_data/gen_hard_bbox_pnet.py")
os.system("python mtcnn_tf-master/prepare_data/gen_landmark_aug.py --stage=pnet")
3.UnboundLocalError: local variable 'type' referenced before assignment
解决方案:设置全局变量 global type