microsoft / CNTK

Microsoft Cognitive Toolkit (CNTK), an open source deep-learning toolkit
https://docs.microsoft.com/cognitive-toolkit/
Other
17.5k stars 4.29k forks source link

C# and .NET support barking #2839

Open nikosdim1 opened 6 years ago

nikosdim1 commented 6 years ago

So we are .NET users and we heavily rely on MS products to do our work/research so we try to use CNTK.

We have the best IDE to work on (VS) and I like the fact that we hit debug and CNTK is open in milliseconds (as opposed to Python’s TF import that starts after 2-3 seconds). Not to forget the excellent VS debugger that we can see any errors coming. I do like also the speed of LSTMs - RNNs I run with CNTK on VB.NET (whaaat ?!?! )

Strangely, though, it seems that we have to abandon C#/VB/F# and learn python because CNTK is more supported in this language (OK C++ too but this is not a ‘clean’ .net language) maybe because other frameworks rely more on Python.

This means that : “Don't use .net languages for the next revolution of AI because the MS framework does not seems to support them fully. Go with the others"

Let’s face it up then : As I see limited answers on C# related problems here - even on Stackoverflow - and bearing in mind the, not so often, CNTK updates I run on this conclusion too : Learn other frameworks because CNTK will be the far left behind. Disagree? Just check TF updates.

I know that CNTK has a small team behind so maybe I have to be more patient, but, for example, my opinion is that ONNX was not a priority to make a whole update because other frameworks adopt it. Are there more users of ONNX than C#/VB/F# Users ? I don’t think so

Finally excuse me for my long issue, but as a heavy user of MS products (included a lot of proprietary) I feel sorry to have a very good NN framework with limited support on my base language (and yes its VB.Net)

Maybe when I start using more and more TF I might not get back and complain again on this Repo

In any case thank u CNTK Team for your efforts but please consider above issues many of .NET users DO have and wait for.

sharpwood commented 6 years ago

@ebarsoumMS

sharpwood commented 6 years ago

Now, many .Net programmers learn python for deep learning, and if they adapt to python, will they not give up TensorFlow and PyTorch back to .NET and CNTK ? In the age of AI, CNTK is not just the CNTK team, but also the future of Microsoft's .Net and Visual Studio product lines.

nikosdim1 commented 6 years ago

totally agree @sharpwood . I have used Tensorflow on Python and the lack of a good IDE and the slow startups was overwhelming, in comparison with VS and C#/VB. Maybe when MS finally support .NET programmers on CNTK we will be already, fanatic Tensorflowers !!!

veikkoeeva commented 6 years ago

Cross-referencing https://github.com/Microsoft/CNTK/issues/960, which seem to be the main thread on .NET support.

sharpwood commented 6 years ago

It feels good to write python with VS2017, and it's suitable for c#/vb.net programmers. @nikosdim1

Aberro commented 6 years ago

Well, it looks like Tensorflow has better .NET wrappers than CNTK do. And I don't think Python is so much better for AI, math and data flows than C#, not after C# 6.0 for sure. And now I've lost two days overwriting TF+Python code into CNTK+C# to use WPF, which I know better than any python UI lib, just to find out that CNTK API is almost useless.

veikkoeeva commented 6 years ago

http://brandewinder.com/2018/01/14/CNTK-etudes-sequential-model/ (CNTK + F#).

douglas125 commented 6 years ago

Still expecting the High Level C# Api as promised

Me too

Jahanaray commented 6 years ago

Actually, we need that High Level C# Api as soon as possible, it's necessary for us (and also microsoft) in order to keep support for CNTK and .NET. The documentation for C# & UWP with CNTK is so much confusing and useless that I prefer to use other AI frameworks.

nikosdim1 commented 6 years ago

I agree @Jahanaray . Do you - and all of .net users that commented - think that somebody will respond to us ? :(

Jahanaray commented 6 years ago

let's hope to ... It's necessary for microsoft and .NET community.

falahati commented 6 years ago

+1

aaad commented 6 years ago

I would like to also highlight the importance of .NET standard support.

BrettHewitt commented 6 years ago

I second highlighting the importance of a .NET standard, for anything other than classification there is little to no documentation, and when converting from Python code to C#, results also appear to be different.

How has everyone else coped with this issue? Have you given up and begun using Python? Tried using the .NET bindings for Tensorflow? Or found any other alternatives?

falahati commented 6 years ago

Well, I considered using Python, but I had a lot of tools and utilities in C# and couldn't simply move to Python. And to be honest I am not very comfortable around it anyway. The situation with .net libraries of Tensorflow was no better. There are some C# libraries out there, but I didn't like getting too far from TW or CNTK so I ditched this idea as well.

In the end, I decided to write one, or extend one. So I grabbed SiaNet and extended it by a bit in the last couple of months everytime I found myself with some free time. I do consider the whole thing as a way to understand the CNTK and similar libraries better. However, my version is by no mean functional, or even accurate currently. So I personally don't recommend it. But it might be a good point to start or to expand if this is an option for you and don't have an active project pressuring you at the moment. https://github.com/falahati/SiaNet

The thing is, the environment is not good for .Net developers now. MS can help a lot with this; if they try.

veikkoeeva commented 6 years ago

Adding also to this thread for convenience: https://github.com/dotnet/machinelearning/.

deepakkumar1984 commented 5 years ago

After failing to properly implement high-level API with CNTK, I then moved on with MxNet which also didn't worked out that well cause of so much dependency and small help. I start to build another Deep learning framework from scratch in C# with custom backend https://github.com/deepakkumar1984/SiaNet/ So far the results are not that bad, the performance is also great when running with GPU. Have the option to support any CUDA version >= 8.0

I have branched out the CNTK backend version which is not functional but if anyone is interested can start working on enhancing it. This includes changes made by @falahati https://github.com/deepakkumar1984/SiaNet/tree/sianet-cntk

And here is the MxNet version: https://github.com/deepakkumar1984/SiaNet/tree/sianet-mxnet