dmlc / MXNet.jl

MXNet Julia Package - flexible and efficient deep learning in Julia
372 stars 70 forks source link

Any plans to add custom loss functions? #77

Open Simplex-AP opened 8 years ago

Simplex-AP commented 8 years ago

The python version of MXNet has the capability to define custom loss functions, but this is missing from the Julia version. Are there any plans to add it?

vchuravy commented 8 years ago

Depends on #39 and see my work in #16. The ability to define custom loss functions requires layers written in python and is what inspired me to work on it. I have plans to work on this but it will need to wait till julia v0.5

pluskid commented 8 years ago

Another option which might be easier to implement (though involves quite a lot refactoring but not technically difficult) is the new module system in the mxnet python side. See dmlc/mxnet#1868 for example. With the new module system, a hybrid symbolic and imperative module can be used. The computation graph is built using symbolic nodes, while the loss function is written directly in Python.

Unfortunately, I have no estimate of timeline when I would be able to find enough time to port that to Julia side. Contributions are very welcome of course!

Arkoniak commented 7 years ago

There is a discussion In R branch of MXNet. They propose to use MakeLoss function. I've tried to implement their solution in julia:

Well, generally speaking it works, but it looks ugly. it would be nice, if anyone with deep knowledge of MXNet could help.

There are few questions: