-
-
Notifications
You must be signed in to change notification settings - Fork 47.7k
Should neural_network/gan.py_tf be rehabilitated or rewritten? #8937
-
Re: @cclauss's comment on #8936:
Please add an issue to rehabilitate neural_network/gan.py_tf
While working on #8936, I noticed these issues with neural_network/gan.py_tf
:
-
As I pointed out in Fix ruff errors #8936 , the code relies on a separate file, neural_network/input_data.py.DEPRECATED.txt, to get the train/validation/test data. As the filename suggests, the file is deprecated, and
neural_network/gan.py_tf
shouldn't need to rely on this deprecated code. I believe the file was taken directly from TensorFlow's codebase, and comments in the file already state the recommended way to get the required data. -
If we take a look at the current code, we'll see that the bulk of the implementation is contained in a massive
__main__
block. All of this should be refactored into functions for readability and ease of testing. -
I think the code was plagiarized. The file itself contains a comment referencing this Medium article, which is only available to Medium members. From what I was able to see, however, it appears that the implementation was directly copied (with the same variable names and comments).
With these issues in mind, how should we address this file? Should it be merely rehabilitated (meaning that we re-enable the file with minimal changes), or should it be heavily refactored or even completely rewritten?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
To decide whether to merely rehabilitate or to heavily refactor (as you put it) we should first investigate the plagiarism allegations. Personally I think some refactoring is way overdue to make the code easier to read.
Beta Was this translation helpful? Give feedback.