clcarwin / sphereface_pytorch

A PyTorch Implementation of SphereFace.
MIT License
714 stars 172 forks source link

Same index counter in lfw_eval.py at line 90 and line 106 #62

Open bashir-sadeghi opened 2 years ago

bashir-sadeghi commented 2 years ago

You are using the same index "i" for both "for loops" at line 90 and line 106 in "lfw_eval.py"?

sayandipdutta commented 2 years ago

Shouldn't be an issue in terms of logic, maybe unclear for a reader. The top level loop at line 90, calls __next__ method on the range object for each iteration of the loop, thus getting the correct value, regardless of the presence of the other i variable later in the loop.

sayandipdutta commented 2 years ago

I am adding a PR nonetheless, to change the iteration variable and the iteration logic while at it.