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

.NET Support #960

Open
StevenGann opened this Issue Oct 27, 2016 · 120 comments

Comments

Projects
None yet
@StevenGann

Issue #817 was closed with this response:

We fell a little behind. The Python bindings are done in SWIG. I think that can be quickly repurposed into .Net bindings, once done. So it shouldn't be too far out.

That was September 6th. It's now late October and there's been neither an announcement regarding .NET, nor an update to the original issue.

I'm eager to finally work with deep learning on Windows with C# instead of on Linux with Python. I'm sure Python bindings were helpful to some devs, but frankly every other deep learning framework already supports Python and C++. I'm surprised .NET hasn't been a higher priority, since it's something no other system has been able to provide. Now's the chance to become the de facto deep learning library for OOP development!

@wolfma61

This comment has been minimized.

Show comment
Hide comment
@wolfma61

wolfma61 Oct 27, 2016

Contributor

Yes Steven, we hear you and we are sorry for the delay.
This is now one of the highest priority items for us, no definite 'landing day yet', but we should be able to give you at least a date shortly, and you will some work on this topic materializing in branches ...

thx
Wolfgang

Contributor

wolfma61 commented Oct 27, 2016

Yes Steven, we hear you and we are sorry for the delay.
This is now one of the highest priority items for us, no definite 'landing day yet', but we should be able to give you at least a date shortly, and you will some work on this topic materializing in branches ...

thx
Wolfgang

@StevenGann

This comment has been minimized.

Show comment
Hide comment
@StevenGann

StevenGann Oct 27, 2016

That's fantastic, and thank you for the quick reply. I'm happy to wait, I just wanted some signal that it was still in progress.

That's fantastic, and thank you for the quick reply. I'm happy to wait, I just wanted some signal that it was still in progress.

@andrewfry

This comment has been minimized.

Show comment
Hide comment
@andrewfry

andrewfry Oct 27, 2016

Great news! I'm very excited for this.

On Oct 27, 2016 9:35 AM, "Steven Gann" notifications@github.com wrote:

That's fantastic, and thank you for the quick reply. I'm happy to wait, I
just wanted some signal that it was still in progress.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#960 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AHgBXmpKyUsZKcuUE0HFMcicK-AL3UZQks5q4KicgaJpZM4KiTg-
.

Great news! I'm very excited for this.

On Oct 27, 2016 9:35 AM, "Steven Gann" notifications@github.com wrote:

That's fantastic, and thank you for the quick reply. I'm happy to wait, I
just wanted some signal that it was still in progress.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#960 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AHgBXmpKyUsZKcuUE0HFMcicK-AL3UZQks5q4KicgaJpZM4KiTg-
.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Oct 27, 2016

+1 on C/C++ and C#

ghost commented Oct 27, 2016

+1 on C/C++ and C#

@gvoysey

This comment has been minimized.

Show comment
Hide comment
@gvoysey

gvoysey Oct 27, 2016

Will support target .NET, .NET Core, or Mono? I am eager to do cross-platform learning in C#.

gvoysey commented Oct 27, 2016

Will support target .NET, .NET Core, or Mono? I am eager to do cross-platform learning in C#.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Oct 29, 2016

python/R is great for research and prototyping - the general "lab settings". this is what alphabet is doing. CNTK extends further as platform and has to support the footprint of why it is being chosen in the first place.

small to medium scale commercial projects would benefit from the complete integrated API. For many, C# replaces VB and likes. this is different ML/AI sector - from phone apps to websites and small corporate projects.

C# leverages over 15 years of the entire DCOM/J++/COM+/DNA2000 etc effort around integrated windows platform development and is used from distributed applications development, transaction processing to desktop and phone applications.

ghost commented Oct 29, 2016

python/R is great for research and prototyping - the general "lab settings". this is what alphabet is doing. CNTK extends further as platform and has to support the footprint of why it is being chosen in the first place.

small to medium scale commercial projects would benefit from the complete integrated API. For many, C# replaces VB and likes. this is different ML/AI sector - from phone apps to websites and small corporate projects.

C# leverages over 15 years of the entire DCOM/J++/COM+/DNA2000 etc effort around integrated windows platform development and is used from distributed applications development, transaction processing to desktop and phone applications.

@StevenGann

This comment has been minimized.

Show comment
Hide comment
@StevenGann

StevenGann Oct 31, 2016

@zergxyz I'd like to see some numbers showing that more commercial production code uses R than .NET. I'd like to see some data showing more end-user applications and games using Python than .NET.

Can R even be compiled? I know it's basically an open source Matlab but to my knowledge it's still a scripting language. Python can technically be compiled, but compatibility and platform support is poor. Heaven help you if you need something more exotic than the stock Python 2.7 environment.

Academics may favor scripting languages like R and Python, but actual applications tend to be written in actual programming languages. Furthermore, the indie game community is largely dominated by C#, at least more so than Python or R, which means

the main stream in machine learning and deep learning community should be c++/python/R based

Am I addressing the Godking of Deep Learning? Is there an Asimov-style governing body determining what research can be done and how?

You have Python support. I'm sorry if you think R support is more important than C# but the numbers don't lie. C# is more popular than R by every metric. Besides, a quick Google search suggests R already has it's own RNN system, plus it already has support from Tensorflow. Go try Tensorflow instead.

@zergxyz I'd like to see some numbers showing that more commercial production code uses R than .NET. I'd like to see some data showing more end-user applications and games using Python than .NET.

Can R even be compiled? I know it's basically an open source Matlab but to my knowledge it's still a scripting language. Python can technically be compiled, but compatibility and platform support is poor. Heaven help you if you need something more exotic than the stock Python 2.7 environment.

Academics may favor scripting languages like R and Python, but actual applications tend to be written in actual programming languages. Furthermore, the indie game community is largely dominated by C#, at least more so than Python or R, which means

the main stream in machine learning and deep learning community should be c++/python/R based

Am I addressing the Godking of Deep Learning? Is there an Asimov-style governing body determining what research can be done and how?

You have Python support. I'm sorry if you think R support is more important than C# but the numbers don't lie. C# is more popular than R by every metric. Besides, a quick Google search suggests R already has it's own RNN system, plus it already has support from Tensorflow. Go try Tensorflow instead.

@bklooste

This comment has been minimized.

Show comment
Hide comment
@bklooste

bklooste Nov 8, 2016

As these products become more mature they will have to use common languages/platforms , im sick of converting flakey lab code to something that customers can actually use. Large c# programs are everywhere outside of linux (which is used by only a small amount of desktop users).

bklooste commented Nov 8, 2016

As these products become more mature they will have to use common languages/platforms , im sick of converting flakey lab code to something that customers can actually use. Large c# programs are everywhere outside of linux (which is used by only a small amount of desktop users).

@n17s

This comment has been minimized.

Show comment
Hide comment
@n17s

n17s Nov 11, 2016

Member

We have started actual work on C# bindings.
A few questions to the folks that watch this issue:

  • for Python we relied heavily on NumPy as the way to pass tensors in and out. What is the most natural way of doing this in C# ? Especially if you need some simple preprocessing operations like transposing a 640x480x3 tensor to 3x480x640 ?
  • the issue says ".net" but everyone here has not mentioned anything other than C#. Is it safe to assume that C# should be the next language to cover?
Member

n17s commented Nov 11, 2016

We have started actual work on C# bindings.
A few questions to the folks that watch this issue:

  • for Python we relied heavily on NumPy as the way to pass tensors in and out. What is the most natural way of doing this in C# ? Especially if you need some simple preprocessing operations like transposing a 640x480x3 tensor to 3x480x640 ?
  • the issue says ".net" but everyone here has not mentioned anything other than C#. Is it safe to assume that C# should be the next language to cover?
@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Nov 11, 2016

The best would be to clean-up and merge what had been developed for BrainScript with one of the OS libraries or branch it into separate .net development.

Math.NET Numerics : http://numerics.mathdotnet.com/ (http://www.mathdotnet.com/) could be a good starting point. It also supports using native library ie. MKL etc. There had been some effort within MSFT to use/expose it as well https://msdn.microsoft.com/en-us/library/hh304363(v=vs.100).aspx

There are some smaller tensor library specific porting projects like https://libraries.io/github/alex-weaver/TensorSharp .

Not sure I understand your second question. .NET is a framework and leaves the choice of language free. What is the CNTK strategy over the long term ?

Is to provide a class library targeting all CLI compliant languages? If yes, then you need to choose the actual framework - for instance .NET CORE which is cross-platform and open source. The language is then only relevant for documentation and QA.

Alternatives:

  • provide dll/com libraries targeting C++/CLI
  • standalone C++ "unmanaged code" libraries with interfaces for both .net (System.Runtime.InteropServices) and unmanaged code.

This is TensorFlow discussion about C# API - who face similar strategy choice:
tensorflow/tensorflow#18

ghost commented Nov 11, 2016

The best would be to clean-up and merge what had been developed for BrainScript with one of the OS libraries or branch it into separate .net development.

Math.NET Numerics : http://numerics.mathdotnet.com/ (http://www.mathdotnet.com/) could be a good starting point. It also supports using native library ie. MKL etc. There had been some effort within MSFT to use/expose it as well https://msdn.microsoft.com/en-us/library/hh304363(v=vs.100).aspx

There are some smaller tensor library specific porting projects like https://libraries.io/github/alex-weaver/TensorSharp .

Not sure I understand your second question. .NET is a framework and leaves the choice of language free. What is the CNTK strategy over the long term ?

Is to provide a class library targeting all CLI compliant languages? If yes, then you need to choose the actual framework - for instance .NET CORE which is cross-platform and open source. The language is then only relevant for documentation and QA.

Alternatives:

  • provide dll/com libraries targeting C++/CLI
  • standalone C++ "unmanaged code" libraries with interfaces for both .net (System.Runtime.InteropServices) and unmanaged code.

This is TensorFlow discussion about C# API - who face similar strategy choice:
tensorflow/tensorflow#18

@n17s

This comment has been minimized.

Show comment
Hide comment
@n17s

n17s Nov 11, 2016

Member

Thanks for the pointer to the TF issue and the pointers to the libraries.

User convenience is the main reason we are doing the bindings. The library is in C++ so if you are determined enough you can program like this, and call it from C# with unsafe code. But that would be ugly, error prone, and hardly deserving to be called "support for .net".

Member

n17s commented Nov 11, 2016

Thanks for the pointer to the TF issue and the pointers to the libraries.

User convenience is the main reason we are doing the bindings. The library is in C++ so if you are determined enough you can program like this, and call it from C# with unsafe code. But that would be ugly, error prone, and hardly deserving to be called "support for .net".

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Nov 11, 2016

You are facing some strategic choices for the platform you are building. A lot of CNTK code is redundant or/and dependent on some specific non-easily portable (platform/language) libraries. Looks like you want to re-package the added value over a couple of different directions.

If you target the .net framework (for example .NET CORE) you will have python support free with it on par with other CLI languages (https://github.com/IronLanguages). Not targeting .net means exactly what you had said - poor penetration of potential CNTK users who face hurdles of complexity of interfacing with unmanaged code from their .net environment.

My point of view is product/platform and the necessary resources. It is clear that anything is feasible and usable right now with a given effort. The core of the platform works well - distributed training using GPU/CPU etc.

I would of thought that for model training BrainScript should be enough (with parallel bindings in python). For training via .net applications you could integrate BrainScript into .net or provide a .net library that interprets BrainScript files. You dont have to re-invenent the function by function brainscript binding for model training!

The key area is for the model evaluation. Python users would not notice any difference, while people targeting commercial applications (providing a trained model and an application built on top of the model) would benefit from robust model loading and evaluation via managed code support. There is also less of a performance impact - and smaller percentage of use cases requiring HPC like latencies in evaluation.

I will have a lot more feedback over the next few weeks as we check various CNTK areas - including real-time usage of CNTK Evaluation (C unmanaged code interfacing with native win C++ DLL that uses CNTK Evaluation)

ghost commented Nov 11, 2016

You are facing some strategic choices for the platform you are building. A lot of CNTK code is redundant or/and dependent on some specific non-easily portable (platform/language) libraries. Looks like you want to re-package the added value over a couple of different directions.

If you target the .net framework (for example .NET CORE) you will have python support free with it on par with other CLI languages (https://github.com/IronLanguages). Not targeting .net means exactly what you had said - poor penetration of potential CNTK users who face hurdles of complexity of interfacing with unmanaged code from their .net environment.

My point of view is product/platform and the necessary resources. It is clear that anything is feasible and usable right now with a given effort. The core of the platform works well - distributed training using GPU/CPU etc.

I would of thought that for model training BrainScript should be enough (with parallel bindings in python). For training via .net applications you could integrate BrainScript into .net or provide a .net library that interprets BrainScript files. You dont have to re-invenent the function by function brainscript binding for model training!

The key area is for the model evaluation. Python users would not notice any difference, while people targeting commercial applications (providing a trained model and an application built on top of the model) would benefit from robust model loading and evaluation via managed code support. There is also less of a performance impact - and smaller percentage of use cases requiring HPC like latencies in evaluation.

I will have a lot more feedback over the next few weeks as we check various CNTK areas - including real-time usage of CNTK Evaluation (C unmanaged code interfacing with native win C++ DLL that uses CNTK Evaluation)

@bklooste

This comment has been minimized.

Show comment
Hide comment
@bklooste

bklooste Nov 20, 2016

@n17s I would wrap the C++ tensor. C# has unsafe pointers for exactly this reason and you don't want large amounts of memory in C# when the lib doing the work is C++ , you especially dont want to move the memory from to C# and then copy it into C++ thats a killer often seen in network stacks. So id provide access to the C++ tensor , pin it to modify . A lot of C# network apis do that as well they hold the packet in native and allow the reading into C# only when desired. Probably consider to just write the wrapper in C++CLI as it fits better with the project however C++ CLI will not fit with core ( and core on Linux) .

Agree on brain script only for training , it makes C# a much lighter easier to keep up to date wrapper. Agree on good support here to load and save brain script files. Some methods to construct a brain script file , maybe via expression tree. ( though an extern c call in brainscript would be nice) .

@n17s I would wrap the C++ tensor. C# has unsafe pointers for exactly this reason and you don't want large amounts of memory in C# when the lib doing the work is C++ , you especially dont want to move the memory from to C# and then copy it into C++ thats a killer often seen in network stacks. So id provide access to the C++ tensor , pin it to modify . A lot of C# network apis do that as well they hold the packet in native and allow the reading into C# only when desired. Probably consider to just write the wrapper in C++CLI as it fits better with the project however C++ CLI will not fit with core ( and core on Linux) .

Agree on brain script only for training , it makes C# a much lighter easier to keep up to date wrapper. Agree on good support here to load and save brain script files. Some methods to construct a brain script file , maybe via expression tree. ( though an extern c call in brainscript would be nice) .

@n17s

This comment has been minimized.

Show comment
Hide comment
@n17s

n17s Nov 20, 2016

Member

Sure, the C++ stuff will be wrapped but I believe that's not sufficient. To make this discussion more concrete let's look at this wiki page. An image is loaded, transposed (width x height x channels to channels x height x width), and 128 is subtracted all in one line. This has nothing to do with the CNTK TensorView class, this is all preprocessing to put the input into the right format and numpy is super helpful here. If there's a good library like this in C# we should be leveraging it.

Member

n17s commented Nov 20, 2016

Sure, the C++ stuff will be wrapped but I believe that's not sufficient. To make this discussion more concrete let's look at this wiki page. An image is loaded, transposed (width x height x channels to channels x height x width), and 128 is subtracted all in one line. This has nothing to do with the CNTK TensorView class, this is all preprocessing to put the input into the right format and numpy is super helpful here. If there's a good library like this in C# we should be leveraging it.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Nov 21, 2016

If this is the immediate orientation... whats wrong with using R.NET? https://rdotnet.codeplex.com/ or looking at the msft R roadmap to see if it fits?

ghost commented Nov 21, 2016

If this is the immediate orientation... whats wrong with using R.NET? https://rdotnet.codeplex.com/ or looking at the msft R roadmap to see if it fits?

@StevenGann

This comment has been minimized.

Show comment
Hide comment
@StevenGann

StevenGann Nov 22, 2016

@avader906 To me, the problem with using R is that if I'm going to use an interpreted scripting language inside my native application, I might as well use Python since it's a lot more developed and supported than R.

@avader906 To me, the problem with using R is that if I'm going to use an interpreted scripting language inside my native application, I might as well use Python since it's a lot more developed and supported than R.

@bklooste

This comment has been minimized.

Show comment
Hide comment
@bklooste

bklooste Nov 24, 2016

@n17s Its data in C# and there are a number of image processing libraries , ImageProcessor nuget may do - I dont think this should be part of CNTK project at best a community extension to existing image processing . That said my personal project is for the network to do this .

@n17s Its data in C# and there are a number of image processing libraries , ImageProcessor nuget may do - I dont think this should be part of CNTK project at best a community extension to existing image processing . That said my personal project is for the network to do this .

@deviousasti

This comment has been minimized.

Show comment
Hide comment
@deviousasti

deviousasti Dec 2, 2016

Um, I'm only asking since it's been a while - rather than a date, could you confirm if .NET support is indeed planned?

Um, I'm only asking since it's been a while - rather than a date, could you confirm if .NET support is indeed planned?

@andrewfry

This comment has been minimized.

Show comment
Hide comment
@andrewfry

andrewfry Dec 14, 2016

Any news or updates on this one? I saw a new release was out, but nothing noted regarding .NET/C# support.

Any news or updates on this one? I saw a new release was out, but nothing noted regarding .NET/C# support.

@asdfgasdfsafgsdfa

This comment has been minimized.

Show comment
Hide comment
@asdfgasdfsafgsdfa

asdfgasdfsafgsdfa Jan 5, 2017

2017 now... no love for .net yet? :(

2017 now... no love for .net yet? :(

@zhouwangzw

This comment has been minimized.

Show comment
Hide comment
@zhouwangzw

zhouwangzw Jan 17, 2017

Member

We have just released the beta version of CNTK Library .NET/C# Eval API. https://github.com/Microsoft/CNTK/releases/tag/v2.0.beta8.0.

Member

zhouwangzw commented Jan 17, 2017

We have just released the beta version of CNTK Library .NET/C# Eval API. https://github.com/Microsoft/CNTK/releases/tag/v2.0.beta8.0.

@aiunderstand

This comment has been minimized.

Show comment
Hide comment
@aiunderstand

aiunderstand Jan 20, 2017

Thanks for this important update @zhouwangzw, we are looking forward to see .NET/C# as a first class citizen with both eval and training API's.

Thanks for this important update @zhouwangzw, we are looking forward to see .NET/C# as a first class citizen with both eval and training API's.

@andrewfry

This comment has been minimized.

Show comment
Hide comment
@andrewfry

andrewfry Jan 26, 2017

Definitely a good start.

Definitely a good start.

@lefig

This comment has been minimized.

Show comment
Hide comment
@lefig

lefig Mar 30, 2017

What is the current status of the .NET interface support? Is it live now..? Thanks

lefig commented Mar 30, 2017

What is the current status of the .NET interface support? Is it live now..? Thanks

@andrewfry

This comment has been minimized.

Show comment
Hide comment
@andrewfry

andrewfry Mar 31, 2017

There is no API to create networks/train - not that I am aware. They have a beta version of the C# evaluated after you've already trained your network. Personally I have given up hope for .NET support and have been doing all my ML development with TF & Python. The only selling point for me with CNTK was the fact they were talking about support C#, which I love versus Python. Since that does seem to even be a consideration I have moved on. Hopefully they will reconsider ... one day.

There is no API to create networks/train - not that I am aware. They have a beta version of the C# evaluated after you've already trained your network. Personally I have given up hope for .NET support and have been doing all my ML development with TF & Python. The only selling point for me with CNTK was the fact they were talking about support C#, which I love versus Python. Since that does seem to even be a consideration I have moved on. Hopefully they will reconsider ... one day.

@lefig

This comment has been minimized.

Show comment
Hide comment
@lefig

lefig Mar 31, 2017

Thanks for that. I see. Well I guess its worth trying to use a pythonnet interface between python and .net. I bet the performance would be a dog though.

lefig commented Mar 31, 2017

Thanks for that. I see. Well I guess its worth trying to use a pythonnet interface between python and .net. I bet the performance would be a dog though.

@SuperDaveOsbourne

This comment has been minimized.

Show comment
Hide comment
@SuperDaveOsbourne

SuperDaveOsbourne Apr 29, 2017

I have just downloaded the RC 2 from April 21st and made a .net c# project with it. Not much there. Is this conformation that c# will be a red headed step child of Python support?

I have just downloaded the RC 2 from April 21st and made a .net c# project with it. Not much there. Is this conformation that c# will be a red headed step child of Python support?

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Apr 29, 2017

@SuperDaveOsbourne There is everything needed in C# API to evaluate models trained in Brainscript or Python. However, training models vs evaluating models requires a different ecosphere of support libraries and infrastructure.

The core of CNTK is C++ codebase - it is possible to extend the managed API further. From the number of commits it does not look that wider community is participating much in that direction. One has to accept the fact that the product originated from MSFT research, and without much of an external drive, it would be driven by the commercial priorities of the company funding that research.

What might impact those priorities?

  • Python is the default "glue" choice for DNN across all open source projects. A lot had been developed in terms of libraries and specific support required for scientific computing. Python is overtaking R in terms of statistics and data warehouse / big data applications too. Arguably, C# does not have the same facilities and the required workload to offer them might not be commercially viable without community participation.

  • Python is taught widely - providing steady pool of junior people to join the industry. This could not be said for C# - which remains specialized to middleware and windows applications. It would be logical for C# to focus on model evaluation - easy to integrate with existing systems to run pre-trained models.

You can read between the lines from the recent MSFT announcements regarding the future of SQL Server platform and its satellite products (R Server, PolyBase, PDW/APS) as well as Azure. Python will be brought in on par with R and ML libraries will be broaden. Under that view, Python related commits can be interpreted as priority.

ghost commented Apr 29, 2017

@SuperDaveOsbourne There is everything needed in C# API to evaluate models trained in Brainscript or Python. However, training models vs evaluating models requires a different ecosphere of support libraries and infrastructure.

The core of CNTK is C++ codebase - it is possible to extend the managed API further. From the number of commits it does not look that wider community is participating much in that direction. One has to accept the fact that the product originated from MSFT research, and without much of an external drive, it would be driven by the commercial priorities of the company funding that research.

What might impact those priorities?

  • Python is the default "glue" choice for DNN across all open source projects. A lot had been developed in terms of libraries and specific support required for scientific computing. Python is overtaking R in terms of statistics and data warehouse / big data applications too. Arguably, C# does not have the same facilities and the required workload to offer them might not be commercially viable without community participation.

  • Python is taught widely - providing steady pool of junior people to join the industry. This could not be said for C# - which remains specialized to middleware and windows applications. It would be logical for C# to focus on model evaluation - easy to integrate with existing systems to run pre-trained models.

You can read between the lines from the recent MSFT announcements regarding the future of SQL Server platform and its satellite products (R Server, PolyBase, PDW/APS) as well as Azure. Python will be brought in on par with R and ML libraries will be broaden. Under that view, Python related commits can be interpreted as priority.

@normanhh3

This comment has been minimized.

Show comment
Hide comment
@normanhh3

normanhh3 May 5, 2017

@sethjuarez maybe you can go join this team and give them a leg up!? NuML has some great ideas!

@sethjuarez maybe you can go join this team and give them a leg up!? NuML has some great ideas!

@Sam7

This comment has been minimized.

Show comment
Hide comment
@Sam7

Sam7 May 12, 2017

What does the road map for training in c# look like? @zhouwangzw

Sam7 commented May 12, 2017

What does the road map for training in c# look like? @zhouwangzw

@zhouwangzw

This comment has been minimized.

Show comment
Hide comment
@zhouwangzw

zhouwangzw May 12, 2017

Member

Currently we focus on supporting model evaluation/inference with C#, but do not have a plan yet to add training capability to C# in short term. Of cousrse, this can be changed if there are a lot of demands on it. And we are also very appreciated for any community contribution.

Member

zhouwangzw commented May 12, 2017

Currently we focus on supporting model evaluation/inference with C#, but do not have a plan yet to add training capability to C# in short term. Of cousrse, this can be changed if there are a lot of demands on it. And we are also very appreciated for any community contribution.

@SuperDaveOsbourne

This comment has been minimized.

Show comment
Hide comment
@SuperDaveOsbourne

SuperDaveOsbourne May 12, 2017

Seems like Microsoft will miss machine learning train as much as they did smart phones. With 17 years of .net C# it pains me to see that investment is now worthless for ML. If the future is python then the future is not Microsoft. Maybe they have something hidden, but they need it now with NVidia, Google and others making dedicated hardware to address this market. Intel's huge push late this summer for processors with ML shows that if they miss this wave , they will be relegated to a cloud container company not much different than any other.

SuperDaveOsbourne commented May 12, 2017

Seems like Microsoft will miss machine learning train as much as they did smart phones. With 17 years of .net C# it pains me to see that investment is now worthless for ML. If the future is python then the future is not Microsoft. Maybe they have something hidden, but they need it now with NVidia, Google and others making dedicated hardware to address this market. Intel's huge push late this summer for processors with ML shows that if they miss this wave , they will be relegated to a cloud container company not much different than any other.

@aiunderstand

This comment has been minimized.

Show comment
Hide comment
@aiunderstand

aiunderstand May 12, 2017

@zhouwangzw thanks to CNTK I could evaluate speech, object, gesture recognition data (with multimodal fusion) in a single C# WPF app (for MSc thesis). I trained these networks in python fine, but it did broke the workflow since all other steps (eg. data aquisition with Kinect, analysis, tagging and performance eval) could be done without leaving the app. I'd happily help dev training networks in C# and integrate this in Unity 2017 (with upcoming .net standard 2.0 support) and am sure many others think likewise. So please provide some guidance on where we can contribute and how you see this feature happening. Very much appreciated!

@zhouwangzw thanks to CNTK I could evaluate speech, object, gesture recognition data (with multimodal fusion) in a single C# WPF app (for MSc thesis). I trained these networks in python fine, but it did broke the workflow since all other steps (eg. data aquisition with Kinect, analysis, tagging and performance eval) could be done without leaving the app. I'd happily help dev training networks in C# and integrate this in Unity 2017 (with upcoming .net standard 2.0 support) and am sure many others think likewise. So please provide some guidance on where we can contribute and how you see this feature happening. Very much appreciated!

@bklooste

This comment has been minimized.

Show comment
Hide comment
@bklooste

bklooste May 13, 2017

@SuperDaveOsbourne I dont think Python or C# are good languages for Neural Networks of the future except as thin wrappers ( Tensorflow is C++) ,. I like BrainScript /C++ , why put a thin language on top .

"If the future is python then the future is not Microsoft" This is insightful and correct

@SuperDaveOsbourne I dont think Python or C# are good languages for Neural Networks of the future except as thin wrappers ( Tensorflow is C++) ,. I like BrainScript /C++ , why put a thin language on top .

"If the future is python then the future is not Microsoft" This is insightful and correct

@whitmark

This comment has been minimized.

Show comment
Hide comment
@whitmark

whitmark May 13, 2017

". . . but do not have a plan yet to add training capability to C# in short term"

Disappointing given early expectations set last year and for those looking to deploy the entire train/eval workflow in .NET/C#.

". . . but do not have a plan yet to add training capability to C# in short term"

Disappointing given early expectations set last year and for those looking to deploy the entire train/eval workflow in .NET/C#.

@Sam7

This comment has been minimized.

Show comment
Hide comment
@Sam7

Sam7 May 14, 2017

Thanks @zhouwangzw is there a uservoice setup for CNTK where we can vote for this feature?

As well: how could we go about contributing to a managed training library? Do you mind giving some guidance, I'm having trouble even generating the SwigProxyClasses.

Sam7 commented May 14, 2017

Thanks @zhouwangzw is there a uservoice setup for CNTK where we can vote for this feature?

As well: how could we go about contributing to a managed training library? Do you mind giving some guidance, I'm having trouble even generating the SwigProxyClasses.

@vermorel

This comment has been minimized.

Show comment
Hide comment
@vermorel

vermorel Jun 5, 2017

Contributor

I have posted a long answer on CNTK should adopt a .NET first approach. I hope it would be of interest to the CNTK team. It feels to me that a major opportunity is being wasted for CNTK.

Contributor

vermorel commented Jun 5, 2017

I have posted a long answer on CNTK should adopt a .NET first approach. I hope it would be of interest to the CNTK team. It feels to me that a major opportunity is being wasted for CNTK.

@mathias-brandewinder

This comment has been minimized.

Show comment
Hide comment
@mathias-brandewinder

mathias-brandewinder Jun 5, 2017

I find it interesting that the discussion assumes "either Python or C#", and "scripting vs. production code". I have been on .NET for a while, and for everything machine learning related I use F#, which has all the benefits C# has in terms of performance, is a fantastic scripting language, and can be put in production to interop with C# code without issues. For that matter, every time I look at BrainScript, I see a language that is really, really close to an F# DSL. I'd love to see a Brainscript equivalent in F#.

I find it interesting that the discussion assumes "either Python or C#", and "scripting vs. production code". I have been on .NET for a while, and for everything machine learning related I use F#, which has all the benefits C# has in terms of performance, is a fantastic scripting language, and can be put in production to interop with C# code without issues. For that matter, every time I look at BrainScript, I see a language that is really, really close to an F# DSL. I'd love to see a Brainscript equivalent in F#.

@JimSEOW

This comment has been minimized.

Show comment
Hide comment
@JimSEOW

JimSEOW Jul 15, 2017

Keras Sharp coming to .NET deep Learning

The .NET Deep Learning community has answered. WE WANT A BROAD .NET Deep Learning strategy where C# is treated as FIRST CLASS CITIZEN - so as python.

It is timely that MSFT provides the leadership.

=> WE are MOTIVATED by many NEW features coming to Windows 10. We would like to integrate AI to all these new FEATURES. WE want to democratize AI pervasively in all aspects of Windows 10 that empower Business and Connecting people together.

We see this future CLEARLY through .NET managed languages (C#, F# etc. ) instead of c++ and python.

JimSEOW commented Jul 15, 2017

Keras Sharp coming to .NET deep Learning

The .NET Deep Learning community has answered. WE WANT A BROAD .NET Deep Learning strategy where C# is treated as FIRST CLASS CITIZEN - so as python.

It is timely that MSFT provides the leadership.

=> WE are MOTIVATED by many NEW features coming to Windows 10. We would like to integrate AI to all these new FEATURES. WE want to democratize AI pervasively in all aspects of Windows 10 that empower Business and Connecting people together.

We see this future CLEARLY through .NET managed languages (C#, F# etc. ) instead of c++ and python.

@danielsc

This comment has been minimized.

Show comment
Hide comment
@danielsc

danielsc Jul 18, 2017

Contributor

To be a bit more precise on what I am looking for: we need to prioritize which scenarios we are should enable first and therefore we need to understand what is more important to you. So we want to understand better what problem you want to solve and what algorithms you want to use in .NET.

Here some concrete questions that I would really like to get some answers to -- either directly here, or if you prefer via email to my github name (at) microsoft.com

  1. Could you describe the scenario you would like to use the .NET API for? Which business problem would you like to solve (For instance: Predict whether a customer in the sales funnel is likely to buy; Detection of faulty products based on photos; Detection of anomalies in data)?
  2. Which type of network architecture are you thinking of using (for instance: LSTM, CNN, Fast-R-CNN)?
    Are you planning on building on a pre-trained model or do you expect to build up you own network from building blocks? Are you using a reinforcement learning scenario?
Contributor

danielsc commented Jul 18, 2017

To be a bit more precise on what I am looking for: we need to prioritize which scenarios we are should enable first and therefore we need to understand what is more important to you. So we want to understand better what problem you want to solve and what algorithms you want to use in .NET.

Here some concrete questions that I would really like to get some answers to -- either directly here, or if you prefer via email to my github name (at) microsoft.com

  1. Could you describe the scenario you would like to use the .NET API for? Which business problem would you like to solve (For instance: Predict whether a customer in the sales funnel is likely to buy; Detection of faulty products based on photos; Detection of anomalies in data)?
  2. Which type of network architecture are you thinking of using (for instance: LSTM, CNN, Fast-R-CNN)?
    Are you planning on building on a pre-trained model or do you expect to build up you own network from building blocks? Are you using a reinforcement learning scenario?
@pedronahum

This comment has been minimized.

Show comment
Hide comment
@pedronahum

pedronahum Jul 26, 2017

For Reinforcement learning, I would be very interested in training a deep network in C#.

I believe that Azure Service Fabric or Microsoft Orleans could help to train an Evolutionary Strategies or A3C approach, for example.

The challenge in RL is how to scale to thousands of workers and how to smooth the communication among them. Microsoft has already the cluster tools, we just need to be able to use CNTK natively in those tools.

Great work with CNTK btw.

For Reinforcement learning, I would be very interested in training a deep network in C#.

I believe that Azure Service Fabric or Microsoft Orleans could help to train an Evolutionary Strategies or A3C approach, for example.

The challenge in RL is how to scale to thousands of workers and how to smooth the communication among them. Microsoft has already the cluster tools, we just need to be able to use CNTK natively in those tools.

Great work with CNTK btw.

@veikkoeeva

This comment has been minimized.

Show comment
Hide comment
@veikkoeeva

veikkoeeva Aug 2, 2017

A note about improvements to .NET numerics, such as tensors at https://gitter.im/Microsoft/CNTK?at=59824118210ac269204b229c and it might make sense to try to pull the various people together to see if there's a chance to synchronize minds and see if it could in the future show in a roadmap somehow.

A note about improvements to .NET numerics, such as tensors at https://gitter.im/Microsoft/CNTK?at=59824118210ac269204b229c and it might make sense to try to pull the various people together to see if there's a chance to synchronize minds and see if it could in the future show in a roadmap somehow.

@danielsc

This comment has been minimized.

Show comment
Hide comment
@danielsc

danielsc Aug 4, 2017

Contributor

We just posted the iteration plan for the August iteration: #2194
In this first version of a .NET training API. We aim to enable building and training of simple models like MNIST.

Contributor

danielsc commented Aug 4, 2017

We just posted the iteration plan for the August iteration: #2194
In this first version of a .NET training API. We aim to enable building and training of simple models like MNIST.

@JimSEOW

This comment has been minimized.

Show comment
Hide comment
@JimSEOW

JimSEOW Aug 5, 2017

CNTK for ARM

  • W10M Windows 10 Mobile [UWP ARM 32-bit] ;
  • W10 on ARM [W10A UWP ARM 64-bit] and
  • W10 IoT Core on ARM [UWP ARM 32-bit: e.g. Raspberry Pi,· Qualcomm Snapdragon 410]
  • W10 IoT Core Pro on ARM [UWP ARM 64.bit]

Issues involved

JimSEOW commented Aug 5, 2017

CNTK for ARM

  • W10M Windows 10 Mobile [UWP ARM 32-bit] ;
  • W10 on ARM [W10A UWP ARM 64-bit] and
  • W10 IoT Core on ARM [UWP ARM 32-bit: e.g. Raspberry Pi,· Qualcomm Snapdragon 410]
  • W10 IoT Core Pro on ARM [UWP ARM 64.bit]

Issues involved

@vermorel

This comment has been minimized.

Show comment
Hide comment
@vermorel

vermorel Aug 8, 2017

Contributor

For the reference, I would like to point the .NET deep learning project: Alea Tk. Their C# integration is impressive. They achieve C++ GPU speed with C# and .NET. I am personally impressed by the work done by QuantAlea.

Contributor

vermorel commented Aug 8, 2017

For the reference, I would like to point the .NET deep learning project: Alea Tk. Their C# integration is impressive. They achieve C++ GPU speed with C# and .NET. I am personally impressed by the work done by QuantAlea.

@nmfisher

This comment has been minimized.

Show comment
Hide comment
@nmfisher

nmfisher Aug 9, 2017

+1 for C# support.

nmfisher commented Aug 9, 2017

+1 for C# support.

@fwaris

This comment has been minimized.

Show comment
Hide comment
@fwaris

fwaris Sep 5, 2017

.Net integration is very desirable but I think that F# should get special treatment because of it modeling capabilities. I have laid out the case for F# in another thread.

(thanks @veikkoeeva for cross referencing )

fwaris commented Sep 5, 2017

.Net integration is very desirable but I think that F# should get special treatment because of it modeling capabilities. I have laid out the case for F# in another thread.

(thanks @veikkoeeva for cross referencing )

@n17s

This comment has been minimized.

Show comment
Hide comment
@n17s

n17s Sep 16, 2017

Member

CNTK 2.2 has a C# API. We welcome feedback and contributions for enhancements.

Member

n17s commented Sep 16, 2017

CNTK 2.2 has a C# API. We welcome feedback and contributions for enhancements.

@SuperDaveOsbourne

This comment has been minimized.

Show comment
Hide comment
@SuperDaveOsbourne

SuperDaveOsbourne Sep 16, 2017

<CNTK 2.2 has a C# API. We welcome feedback and contributions for enhancements.>

That's one small step for C#, one giant leap for .net mankind.

A hello-world example to train and evaluate a logistic regression model using C#/API: https://github.com/Microsoft/CNTK/tree/master/Examples/TrainingCSharp/Common/LogisticRegression.cs

<CNTK 2.2 has a C# API. We welcome feedback and contributions for enhancements.>

That's one small step for C#, one giant leap for .net mankind.

A hello-world example to train and evaluate a logistic regression model using C#/API: https://github.com/Microsoft/CNTK/tree/master/Examples/TrainingCSharp/Common/LogisticRegression.cs

@SuperDaveOsbourne

This comment has been minimized.

Show comment
Hide comment

I have created a slack channel for CNTK for dot net. This is a public link.

https://join.slack.com/t/cntkdotnet/shared_invite/enQtMjQyMzE0MTA3MzYzLWEwNjZlYWFmMTI2NzZhZGE3YmQzOTNkY2VkZGM3NDFjODMxNTUwY2M5ZGU4NDQxZDUxZDk5MTdmYWQ4MjY4ZWM

Workspace URL: cntkdotnet.slack.com

@veikkoeeva

This comment has been minimized.

Show comment
Hide comment
@danielsc

This comment has been minimized.

Show comment
Hide comment
@danielsc

danielsc Sep 18, 2017

Contributor

As Nikos pointed out, we now have a C# API that allows for both training and inference. It covers a reasonably broad set of scenarios (including RNNs and Transfer Learning), but it will require further improvements to reach parity with the Python API at a good performance.

Also, we have built this API as a pretty direct mapping to the C++ API using SWIG. This allowed us to move pretty fast, but does not make for a pretty API that follows well established C# design conventions. Our intention here is to build a high-level API on top of this low-level one that would offer easy composition of layers, like the python layers API does.

On both aspects (improve the low-level API, design the high-level API) we are looking to the community to participate and help. Please open issues for improvements to the newly published APIs, and, if you see a way for you to fix them, do let us now, so we can coordinate.
For the high-level API, we would like have some design discussions in the coming weeks -- we will open a new issue for it and will post the link here. At that point, I would also close this issue as resolved -- please let me know if you disagree.

Contributor

danielsc commented Sep 18, 2017

As Nikos pointed out, we now have a C# API that allows for both training and inference. It covers a reasonably broad set of scenarios (including RNNs and Transfer Learning), but it will require further improvements to reach parity with the Python API at a good performance.

Also, we have built this API as a pretty direct mapping to the C++ API using SWIG. This allowed us to move pretty fast, but does not make for a pretty API that follows well established C# design conventions. Our intention here is to build a high-level API on top of this low-level one that would offer easy composition of layers, like the python layers API does.

On both aspects (improve the low-level API, design the high-level API) we are looking to the community to participate and help. Please open issues for improvements to the newly published APIs, and, if you see a way for you to fix them, do let us now, so we can coordinate.
For the high-level API, we would like have some design discussions in the coming weeks -- we will open a new issue for it and will post the link here. At that point, I would also close this issue as resolved -- please let me know if you disagree.

@vermorel

This comment has been minimized.

Show comment
Hide comment
@vermorel

vermorel Sep 18, 2017

Contributor

@danielsc The .NET/C# lib draft is indeed a very good news, and it's very cool to see the CNTK team moving in the right direction for the .NET ecosystem. However, at this time, issues like Microsoft/CNTK/issues/2374 (a design flaw severely impacting performance) prevents most production uses of the library (except for small datasets). This design problem cannot be fixed by layers on top.

Contributor

vermorel commented Sep 18, 2017

@danielsc The .NET/C# lib draft is indeed a very good news, and it's very cool to see the CNTK team moving in the right direction for the .NET ecosystem. However, at this time, issues like Microsoft/CNTK/issues/2374 (a design flaw severely impacting performance) prevents most production uses of the library (except for small datasets). This design problem cannot be fixed by layers on top.

@deepakkumar1984

This comment has been minimized.

Show comment
Hide comment
@deepakkumar1984

deepakkumar1984 Nov 6, 2017

Could be useful project: https://github.com/deepakkumar1984/SiaNet
A wrapper on CNTK for easy building of network and train them

deepakkumar1984 commented Nov 6, 2017

Could be useful project: https://github.com/deepakkumar1984/SiaNet
A wrapper on CNTK for easy building of network and train them

@laygr

This comment has been minimized.

Show comment
Hide comment
@laygr

laygr Nov 11, 2017

Skip C# and prioritize F#, it can be easily advertised as a better Python. Honestly, what is good about C# for ML? If you want to do ML and .Net, lookout for F#.

laygr commented Nov 11, 2017

Skip C# and prioritize F#, it can be easily advertised as a better Python. Honestly, what is good about C# for ML? If you want to do ML and .Net, lookout for F#.

@mikhail-barg

This comment has been minimized.

Show comment
Hide comment
@mikhail-barg

mikhail-barg Nov 11, 2017

Contributor

@laygr I think it's a matter of language preference and have nothing to do with ML. I'd easily say "what's good about F#, do C#!" but there's no point in starting a functional vs. imperative holywar.
As for us we've choosen CNTK mostly because it had native support for .Net (meaning C#) so we could use it seamelessly in production code.

Contributor

mikhail-barg commented Nov 11, 2017

@laygr I think it's a matter of language preference and have nothing to do with ML. I'd easily say "what's good about F#, do C#!" but there's no point in starting a functional vs. imperative holywar.
As for us we've choosen CNTK mostly because it had native support for .Net (meaning C#) so we could use it seamelessly in production code.

@deepakkumar1984

This comment has been minimized.

Show comment
Hide comment
@deepakkumar1984

deepakkumar1984 Nov 11, 2017

@laygr I agree with mikhail-barg. F#, C#, VB all under .NET hood. You can load CNTK in F#. I think the .NET community need to build more libraries similar to python for machine learning.

@laygr I agree with mikhail-barg. F#, C#, VB all under .NET hood. You can load CNTK in F#. I think the .NET community need to build more libraries similar to python for machine learning.

@laygr

This comment has been minimized.

Show comment
Hide comment
@laygr

laygr Nov 11, 2017

@mikhail-barg, @deepakkumar1984. I should have given an example to be more convincing; let's look at the case of Solver Foundation. Microsoft wrote not too long ago a truly great optimization framework called Solver Foundation. It supported .Net, but its design was centered around C# and OOP. However, they also wrote a simple DSL for F# which allowed to define the models in a very succinct way. Lets look at how a model is defined in C# and how it's defined in F# via the DSL. (More on the evident superiority of F# at modeling for Solver Foundation: Units of Measure demo blog post, DSL Demo, check out how constraints are defined.
Clearly, the F# idiom is superior, really, no subjectivity going on, except that by not centering the design of Solver Foundation around F#, the DSL was lacking on functionality, I guess it was not a priority; so if you wanted to use the full power of Solver Foundation, you couldn't use the DSL and you had to write code in the clumsy OO way.
Today you can't use Solver Foundation at all because it is a dead project. Will history repeat?

@deepakkumar1984 I agree that we need more libraries to remain competitive against Python. For a quick fix, we can use IronPython, which allows us tu use Python's libraries in .Net.

laygr commented Nov 11, 2017

@mikhail-barg, @deepakkumar1984. I should have given an example to be more convincing; let's look at the case of Solver Foundation. Microsoft wrote not too long ago a truly great optimization framework called Solver Foundation. It supported .Net, but its design was centered around C# and OOP. However, they also wrote a simple DSL for F# which allowed to define the models in a very succinct way. Lets look at how a model is defined in C# and how it's defined in F# via the DSL. (More on the evident superiority of F# at modeling for Solver Foundation: Units of Measure demo blog post, DSL Demo, check out how constraints are defined.
Clearly, the F# idiom is superior, really, no subjectivity going on, except that by not centering the design of Solver Foundation around F#, the DSL was lacking on functionality, I guess it was not a priority; so if you wanted to use the full power of Solver Foundation, you couldn't use the DSL and you had to write code in the clumsy OO way.
Today you can't use Solver Foundation at all because it is a dead project. Will history repeat?

@deepakkumar1984 I agree that we need more libraries to remain competitive against Python. For a quick fix, we can use IronPython, which allows us tu use Python's libraries in .Net.

@mikhail-barg

This comment has been minimized.

Show comment
Hide comment
@mikhail-barg

mikhail-barg Nov 11, 2017

Contributor

@laygr Do you really mean that this Solver Foundation project is dead because MS designed it more for C# not for F#?

For me personally it would be a huge downside if CNTK would switch it's focus from C# to F# just because I live more on imperative side of programming universe, and I would have to learn another language just to be able to configure CNTK models (learning another language is not bad by itself, but it looks like an overkill for a modelling task) and it would probably be another DSL built upon F#, right? So why bother, there's already a DSL for these models — BrainScript (and we invested time in learning it already).
So I rather then learn more of Python (which I kinda hate) and it would be a better investment of time because Python is a lingua franca in ML society (sadly).

@deepakkumar1984 I aslo agree on the lack of ML libraries for .Net — I've spent some time just to find that there's no real sound processing library for .Net that is capable to reproduce scipy.signal.spectrogram out of the box.

@laygr As far as I know IronPython is rather dead as well. And I'm not sure on the performance side of the C#-IronPyhon-Python-Cython stack (and most of ML Python libraries are built upon native Cython code).

Contributor

mikhail-barg commented Nov 11, 2017

@laygr Do you really mean that this Solver Foundation project is dead because MS designed it more for C# not for F#?

For me personally it would be a huge downside if CNTK would switch it's focus from C# to F# just because I live more on imperative side of programming universe, and I would have to learn another language just to be able to configure CNTK models (learning another language is not bad by itself, but it looks like an overkill for a modelling task) and it would probably be another DSL built upon F#, right? So why bother, there's already a DSL for these models — BrainScript (and we invested time in learning it already).
So I rather then learn more of Python (which I kinda hate) and it would be a better investment of time because Python is a lingua franca in ML society (sadly).

@deepakkumar1984 I aslo agree on the lack of ML libraries for .Net — I've spent some time just to find that there's no real sound processing library for .Net that is capable to reproduce scipy.signal.spectrogram out of the box.

@laygr As far as I know IronPython is rather dead as well. And I'm not sure on the performance side of the C#-IronPyhon-Python-Cython stack (and most of ML Python libraries are built upon native Cython code).

@vermorel

This comment has been minimized.

Show comment
Hide comment
@vermorel

vermorel Nov 20, 2017

Contributor

Referencing here the Tensor<T> type coming to .NET which would be a great addition for CNTK.

Contributor

vermorel commented Nov 20, 2017

Referencing here the Tensor<T> type coming to .NET which would be a great addition for CNTK.

@veikkoeeva

This comment has been minimized.

Show comment
Hide comment
@veikkoeeva

veikkoeeva Nov 21, 2017

Cross-referecing discussion at #2352 since it's about .NET Standard 2.0.

Cross-referecing discussion at #2352 since it's about .NET Standard 2.0.

@MgSam

This comment has been minimized.

Show comment
Hide comment
@MgSam

MgSam Nov 26, 2017

I tried going through the C# CTNKLibraryCSharpTrainingExamples today. I think its a great start!

I have some feedback, please keep in mind while reading this that it's all from the point-of-view from a complete ML novice who doesn't understand much about what goes on under the hood, only about the general ML workflow of training, validating, and applying a model.

Feedback:

  • I think there should be a higher-level API than what currently seems to be available (at least as far as I can tell). For example, the Azure Machine-Learning Studio provides a Training Model step that requires literally only three inputs- a model, a dataset (which can be of hybrid types like strings and floats), and what the output variable(s) are. Everything else is set using what I assume are sensible defaults. I'd imagine that for the majority of users (who are not statisticians or ML experts), this is how they want to get started. Tutorial I used
  • Why is the logistic regression network linear model defined explicitly in the code (create LinearModel method) rather than part of the library? According to the CNTK tutorial it has been a staple for the past decade. Under what circumstances would a non-statistician be knowledgeable enough to define a different model?
  • I understand the convenience of generating random data for testing out the library, but its not a good way to help people learn. I think you should put a CSV with real-world data (ideally with mixed strings, dates, and floats) in the example solution, and in the example Program.cs, load it into memory and pass it into the TrainAndEvaluate methods. Seeing the code work on actual data instead of random numbers would be a lot more helpful in helping to understand how its working.

Thanks for all your hard work on the C# API!

MgSam commented Nov 26, 2017

I tried going through the C# CTNKLibraryCSharpTrainingExamples today. I think its a great start!

I have some feedback, please keep in mind while reading this that it's all from the point-of-view from a complete ML novice who doesn't understand much about what goes on under the hood, only about the general ML workflow of training, validating, and applying a model.

Feedback:

  • I think there should be a higher-level API than what currently seems to be available (at least as far as I can tell). For example, the Azure Machine-Learning Studio provides a Training Model step that requires literally only three inputs- a model, a dataset (which can be of hybrid types like strings and floats), and what the output variable(s) are. Everything else is set using what I assume are sensible defaults. I'd imagine that for the majority of users (who are not statisticians or ML experts), this is how they want to get started. Tutorial I used
  • Why is the logistic regression network linear model defined explicitly in the code (create LinearModel method) rather than part of the library? According to the CNTK tutorial it has been a staple for the past decade. Under what circumstances would a non-statistician be knowledgeable enough to define a different model?
  • I understand the convenience of generating random data for testing out the library, but its not a good way to help people learn. I think you should put a CSV with real-world data (ideally with mixed strings, dates, and floats) in the example solution, and in the example Program.cs, load it into memory and pass it into the TrainAndEvaluate methods. Seeing the code work on actual data instead of random numbers would be a lot more helpful in helping to understand how its working.

Thanks for all your hard work on the C# API!

@fwaris

This comment has been minimized.

Show comment
Hide comment
@fwaris

fwaris Jan 20, 2018

Bravely or foolishly taking matters into own hand see issue #2863

(functional nature of F# better suited for math modeling - at the end of the day the DL toolkits are Math languages)

fwaris commented Jan 20, 2018

Bravely or foolishly taking matters into own hand see issue #2863

(functional nature of F# better suited for math modeling - at the end of the day the DL toolkits are Math languages)

@veikkoeeva

This comment has been minimized.

Show comment
Hide comment
@ivannp

This comment has been minimized.

Show comment
Hide comment
@ivannp

ivannp Mar 4, 2018

Member

Another proof-of-concept Keras-like approach - NativeKeras.

Member

ivannp commented Mar 4, 2018

Another proof-of-concept Keras-like approach - NativeKeras.

@sgf

This comment has been minimized.

Show comment
Hide comment
@sgf

sgf Jun 3, 2018

CNTK developers have no belief.
Actually, Microsoft, many developers alike.
They are no longer capable of creating great works like Windows, Make history.
And now they are just doing the same like others.
Just Follow the footsteps of others.

sgf commented Jun 3, 2018

CNTK developers have no belief.
Actually, Microsoft, many developers alike.
They are no longer capable of creating great works like Windows, Make history.
And now they are just doing the same like others.
Just Follow the footsteps of others.

@veikkoeeva

This comment has been minimized.

Show comment
Hide comment
@veikkoeeva

veikkoeeva Jun 3, 2018

I'll add here for the benefit of passers-by, the .NET kid on the block seems to MachineLearning.Net. It should be able to use CNTK binaries also.

I'll add here for the benefit of passers-by, the .NET kid on the block seems to MachineLearning.Net. It should be able to use CNTK binaries also.

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