RobertCsordas / RFCN-tensorflow

RFCN implementation in TensorFlow
292 stars 137 forks source link

Error while running demo file -> KeyError: 'Repeat_1' #6

Closed ananddb90 closed 7 years ago

ananddb90 commented 7 years ago

Hi @xdever , while running demo test.py, I am getting below error. I am not able to understand what exactly is the problem.

anand@aicenter001:~/Desktop/anand/RFCN-tensorflow$ ./test.py -n pretrained/export/model.data-00000-of-00001 -i PEDS-CityTrafficB.jpg -o PEDS-CityTrafficB1.jpg

Training network from end Traceback (most recent call last): File "./test.py", line 51, in net = BoxInceptionResnet(image, len(categories), name="boxnet") File "/home/anand/Desktop/anand/RFCN-tensorflow/BoxInceptionResnet.py", line 43, in init scale_16 = self.googleNet.getOutput("Repeat_1")[:,1:-1,1:-1,:] File "/home/anand/Desktop/anand/RFCN-tensorflow/InceptionResnetV2.py", line 277, in getOutput return self.endPoints[name] KeyError: 'Repeat_1'

Could you please help me to know the possible reason and how can I fix this.

Thank you.

RobertCsordas commented 7 years ago

Dear @ananddb90, It's probably because you are using python2. I just made a modification which should make code python2 compatible. Please check if it fixes the problem.

Jamescallow commented 7 years ago

There is no 'nonlocal' in python2,you should update python2 to python3 or write a function which realize the 'nonlocal' by yourself

RobertCsordas commented 7 years ago

I already removed the nonlocal keyword, tried to train it in python2, and it works fine.

Jamescallow commented 7 years ago

@xdever OK,thank you for telling me.

ananddb90 commented 7 years ago

@xdever thank you for your help