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

Is creation of custom operators supported? #166

Open
philtomson opened this issue Jan 10, 2017 · 7 comments
Open

Is creation of custom operators supported? #166

philtomson opened this issue Jan 10, 2017 · 7 comments
Assignees

Comments

@philtomson
Copy link

In the MXNet docs there's a section on how to create new custom operators (Layers) and the doc there suggests this can be done in the "front-end" language - Python is suggested, but I'm wondering if this is doable in Julia as well? The document talks about using CustomOp for doing this, but I'm not seeing that under mx.

Specifically, their example code for Python shows:

class Softmax(mx.operator.CustomOp)
...

I'm not seeing an mx.operator.CustomOp when I search around in the Julia REPL.

@vchuravy
Copy link
Collaborator

This is not yet possible in Julia, but it is something that I am working on.

@vchuravy vchuravy self-assigned this Jan 10, 2017
@philtomson
Copy link
Author

@vchuravy What's involved in doing this? I have some time, I might be able to help out.

@Arkoniak
Copy link
Contributor

Arkoniak commented Jan 11, 2017

I suppose there was a long discussion in thread, that may be of interest to you: #16
Also there was some discussion in #39 (comment) with link to source and example, that can be fixed.

@vchuravy
Copy link
Collaborator

Both #16 and #130 are the wrong way of doing this :) The problem is that async callbacks into Julia are tricky to get right (no GIL to help us out) and if you do get them right they are pretty slow, limited and brittle. I discussed this with pluskid over the summer and the right way of doing this is to bring the module system to MXNet.jl (#129 (comment)).

I am now back on working on this so I hope to make progress in the next weeks.

@Arkoniak
Copy link
Contributor

@vchuravy Can you tell what are the main guidelines for implementing this api and what schedule do you have in mind? I've started to implement module api as well, it's still heavy WIP, but you can see it here: https://github.com/Arkoniak/MXNet.jl/tree/mx_module/src

It is based on https://github.com/dmlc/MXNet.jl/tree/vc/module, port of python code (incomplete) and reuse of FeedForward model. If you have any progress of your own or you know main points that should be taken care of, it would be nice to cooperate, because this module feature is a real must have. May be this topic deserve it's own issue.

@vchuravy
Copy link
Collaborator

@Arkoniak My work is on https://github.com/oist/MXNet.jl/tree/vc/module and I am starting to work on this again today and aim to finish it soon (tm).

@vchuravy
Copy link
Collaborator

@Arkoniak I rebased my work and if you are keen to also work on this I would appreciate PRs against vc/module here.

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

No branches or pull requests

3 participants