Stinky-Tofu / Stronger-yolo

🔥Improve yolo with latest paper
MIT License
3 stars 0 forks source link

V3/NameError: name 'file' is not defined #97

Open MichaelCong opened 5 years ago

MichaelCong commented 5 years ago

:~/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

Stinky-Tofu commented 5 years ago

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

eleflea commented 5 years ago

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