mdabros / SharpLearning

Machine learning for C# .Net
MIT License
383 stars 84 forks source link

CNTK as backend for SharpLearning.Neural #9

Open mdabros opened 6 years ago

mdabros commented 6 years ago

The Microsoft team working on CNTK has recently released the initial version of the C#/.Net API with support for both evaluation and training of neural networks. A more feature complete version, with support for layers and other helpful features, should arrive before the end of the year. Currently, there seems to be a few performance related issues (https://github.com/Microsoft/CNTK/issues/2374 and https://github.com/Microsoft/CNTK/issues/2386) but hopefully these will be also be solved in the next release.

Using CNTK as backend for SharpLearning.Neural will add operators for more layer and network types, while also enabling GPU training and evaluation. Using a well supported deep learning toolkit as backend will also help to ensure that future operator, layer and network types will be available faster.

This task will require a large rewrite of SharpLearning.Neural, most likely only keeping the top level interface. However, since all the core operations are availible from CNTK, most of the hard work is already completed.

This task should be split into multiple others when a design of how CNTK should be integrated has been completed. A few considerations:

liqunfu commented 6 years ago

Hi @mdabros , that Microsoft/CNTK#2374 is fixed. If you are using CNTK from source, the fix is effective. If you are using CNTK NuGet package, the fix will be available on Nov 7th in CNTK 2.3 Release. Thanks!

mdabros commented 6 years ago

Hi @liqunfu, Thanks for taking the time to inform me and thanks for the great work! Looking forward to the 2.3 release :-).

mdabros commented 6 years ago

Initial work/investigation for creating "backend" projects for interfacing with CNTK and TensorFlowSharp has been started in the branch: backends. This approach focuses on creating a common low level API for interfacing with the deep learning tool kits, and rewriting SharpLearning.Neural on top of this API. So the more "advanced" of the two options mentioned in the original message.

There is also a pull request where progress/changes can be tracked in #35