Keras: Framework-Design: Why renaming Convolution to Conv in Keras 2?

Created on 29 Mar 2017  路  7Comments  路  Source: keras-team/keras

As mentioned here and seen in the source-code, the new way of creating a convolution layer is by using the Conv*-name. Although there exists an alias Convolution*, the overall design question is, why would anyone want to swap a perfectly named object with a non-trivial abbreviation in a framework such as Keras? Especially when other abbreviations are being removed at the same time (e.g. b_regularizer -> bias_regularizer).

In my experience as a developer, introducing abbreviations is _never_ a good choice, because it makes code harder to read and comprehend (clarity trumps brevity). Especially in core concepts of a framework! I am really interested in the reasons that led to this design decision and would strongly argue that for future releases, the implementation works the other way around again: Having classes called Convolution* and aliases Conv* for convenience reasons and recommending the use of Convolution*.

All 7 comments

I agree with you. I was recently looking at the documentation and was surprised to see that Convolution* was no longer present, replaced by Conv*. Yet in other parts of the code, abbreviations aren't being used and some are even being removed, as you said. This lack of consistency kinda bothers me.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 30 days if no further activity occurs, but feel free to re-open a closed issue if needed.

Bump - to avoid this issue from being closed without discussion by the maintainers.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 30 days if no further activity occurs, but feel free to re-open a closed issue if needed.

Bump - to avoid this issue from being closed without discussion by the maintainers.

Bump :(

The summary is:

  • if you prefer Convolution*, you can still use that style. It will be supported indefinitely.
  • many people prefer Conv*, because it's shorter.
  • we standardized on Conv* to unify the Keras API and the tf.layers API.
Was this page helpful?
0 / 5 - 0 ratings