Stinky-Tofu/Stronger-yolo

V3/NameError: name 'file' is not defined

Opened this issue · 2 comments

:~/Stronger-yolo/v3$ python train.py
WARNING: Logging before flag parsing goes to stderr.
W0825 11:11:38.550147 139889201944320 deprecation_wrapper.py:119] From /home/rencong/Stronger-yolo/v3/model/layers.py:207: The name tf.nn.max_pool is deprecated. Please use tf.nn.max_pool2d instead.

Traceback (most recent call last):
File "train.py", line 160, in
Yolo_train().train()
File "train.py", line 29, in init
self.__train_data = Data()
File "/home/rencong/Stronger-yolo/v3/utils/data.py", line 36, in init
annotations_2007 = self.__load_annotations(os.path.join(self.__dataset_path, '2007_trainval'))
File "/home/rencong/Stronger-yolo/v3/utils/data.py", line 55, in __load_annotations
with file(img_inds_file, 'r') as f:
NameError: name 'file' is not defined

@MichaelCong 麻烦按照readme做。。。,readme可以成功

@MichaelCong 作者使用的是python2,在python3中是没有file这个函数的。