Cleanup pqlayers#60
Conversation
nastiapetrovych
left a comment
There was a problem hiding this comment.
Hi @nroope, nice work improving the readability of PQLayers. Could you, please, add a short summary of the main changes to the PR description?
The main comment I have is that layers modules are quite huge, that makes different to orient within the changes or functionalities. Maybe, we can find a solution how to split them in smaller and clearer functional parts? Also, how to deal with overlap of keras and torch much better?
I've also left a few inline comments within the code to change, let me know if sth is unclear.
| return AutoSparse(config, layer_type) | ||
| elif pruning_method == "cs": | ||
| return ContinuousSparsification(config, layer_type) | ||
| elif pruning_method == "fitcompress": |
There was a problem hiding this comment.
instead of using multiple if conditions here, you can define a dictionary that maps each pruning method to its corresponding pruning class -> then you can simply look up the appropriate class and instantiate it in a single line
No description provided.