yunjey / show-attend-and-tell

TensorFlow Implementation of "Show, Attend and Tell"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AttributeError: 'Meteor' object has no attribute 'lock'

ivy94419 opened this issue · comments

when trying to training from scratch, one iteration is finished, and it need to compute scores, and some issues occur as follows:

Traceback (most recent call last):
File "D:/AIBU/image_caption/showAttendTell/train.py", line 26, in
main()
File "D:/AIBU/image_caption/showAttendTell/train.py", line 22, in main
solver.train()
File "D:\AIBU\image_caption\showAttendTell\core\solver.py", line 172, in train
scores = evaluate(data_path='./data', split='val', get_scores=True)
File "D:\AIBU\image_caption\showAttendTell\core\bleu.py", line 47, in evaluate
final_scores = score(ref, hypo)
File "D:\AIBU\image_caption\showAttendTell\core\bleu.py", line 14, in score
(Meteor(),"METEOR"),
File "D:\AIBU\image_caption\showAttendTell\pycocoevalcap\meteor\meteor.py", line 24, in init
stderr=subprocess.PIPE)
File "D:\software\Anaconda\lib\subprocess.py", line 709, in init
restore_signals, start_new_session)
File "D:\software\Anaconda\lib\subprocess.py", line 997, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] 系统找不到指定的文件。
Exception ignored in: <bound method Meteor.del of <pycocoevalcap.meteor.meteor.Meteor object at 0x000001E3288BC6D8>>
Traceback (most recent call last):
File "D:\AIBU\image_caption\showAttendTell\pycocoevalcap\meteor\meteor.py", line 76, in del
self.lock.acquire()
AttributeError: 'Meteor' object has no attribute 'lock'

How to deal with it? Thank you!

I installed java8, and add shell=True in subprocess.Popen() function, then this problem is solved.