kimhc6028 / relational-networks

Pytorch implementation of "A simple neural network module for relational reasoning" (Relational Networks)
https://arxiv.org/pdf/1706.01427.pdf
BSD 3-Clause "New" or "Revised" License
812 stars 160 forks source link

dead code reported by vulture #3

Closed RJ722 closed 7 years ago

RJ722 commented 7 years ago

We used vulture to search for unused code in your project. You can find the report below. It would be great if you could give us feedback about which items are actually used or unused. This would allow us to improve vulture and ideally it also helps you to remove obsolete code or even find typos and bugs.

Command

vulture relational-networks

Raw results

relational-networks/main.py:43: Unused variable 'kwargs'
relational-networks/main.py:138: Unused variable 's_datasets'
relational-networks/model.py:34: Unused function 'forward'
relational-networks/sort_of_clevr_generator.py:11: Unused variable 'question_size'
relational-networks/sort_of_clevr_generator.py:13: Unused variable 'answer_size'
relational-networks/translator.py:2: Unused function 'translate'

There might be false positives, which can be prevented by adding them to a whitelist file. You may find more info here

Regards, vulture team

kimhc6028 commented 7 years ago

Thank you for let me know this wonderful program. Vulture actually found kind of big bug!

For feedback, function 'forward' is actually used and other elses are not. Even though function 'forward' is never be called explicitly by code, this is essential function to compute pytorch model. So, I think it would be better to add 'forward' to whitelist if one is importing pytorch. Thank you.