whilst I understand your point (I think) I do feel the left option requires a far more advanced understanding of python and for many mere mortals adds 20 minutes of trying to work it out myself I'd go with the right option if others are to read the code feel free to disagree
-
-
-
You're right, it's just preference
- Show replies
New conversation -
-
-
Can use functools.partial instead, yes?
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
I disagree. This violates standards such as default linting avoiding functions with class-like names. At best, define classes with __call__ but honestly, why? Just make plain functions that don’t need closures. Be more explicit not less. Have nice arg signatures & unit tests.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Violating lint & python naming convention - is a slippery slope. Better stick to subclassing.
-
Do you mean (Using
@fchollet's code as reference) - making ConvBlock a subClass of conv2D instead of a function?? - Show replies
New conversation -
-
-
Nice Tip thanks for sharing...
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.