Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make adding a new layer easier. #156

Open
harold opened this issue Apr 26, 2017 · 1 comment
Open

Make adding a new layer easier. #156

harold opened this issue Apr 26, 2017 · 1 comment

Comments

@harold
Copy link
Contributor

harold commented Apr 26, 2017

There is tension between ease of extension between backends ↔️ layers.

  1. If things are organized such that each backend is implemented in a single file, then adding a new backend is easy; work from the code for the most similar backend and implement what's there in terms of the new backend. This has the downside that there is no one place to go to see the whole of the implementation of any given layer type.

  2. If things are organized such that each layer is implemented in a single file, then adding a new layer is easy; work from the code of the most similar layer and implement what you need for your new layer type. This has the downside that all the code related to a specific backend is spread throughout the layer files.


In discussion we have decided to prefer (2) above. A machine learner using cortex is more likely to want to implement a new layer than a new backend. In general, we would like to move the implementation of cortex in that direction, simplifying the process of experimenting with new layer types.

@rosejn
Copy link
Contributor

rosejn commented Apr 26, 2017

So one way to approach this kind of trade-off is to look at the number of each system we have, and determine the likelihood of our users adding either of them. It seems like given that we have way more layers, and that layers are the more likely component for ourselves and our users to add, then that should take priority in terms of simplifying the extension points.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants