migueldeicaza / TensorFlowSharp

TensorFlow API for .NET languages
MIT License
3.14k stars 578 forks source link

Extending Simple Test - Are we there for all TensorflowSharp bugs? how could we coordinate? #77

Open JimSEOW opened 7 years ago

JimSEOW commented 7 years ago

I benefit much from the community effort to port python tensorflow code to tensorflowSharp

Currently, I am trying using Xamarin Workbook to document and test TensorflowSharp Simple Test. It works. [except some document issue ]

xamarin workbooks_2017-05-31_00-14-59

xamarin workbooks_2017-05-31_00-15-18

Eventually, perhaps we could have "jupyter notebook" version of TensorflowSharp to organize community effort to organize Simple Test.

FYI: Most of the Simple Test is derived from Basic Models brave_2017-05-30_23-36-17

Other possible python tensorflow codes to be ported include:

brave_2017-05-30_23-36-25

Questions:
[1] It has been claimed that Most of the C Api has been ported and exposed through Tensorflowsharp => What is the best way to move on to the 3_Nueral Network Models?
=> Are we ready to just read through what have been ported to Basic Models and start porting the Neural Network python codes to TensorflowSharp? => We still have some bugs with SimpleTest. The AttributeTest fails. Is it relevant to prevent us for further porting? => I have download the latest Widows DLL with TF_NEWWHILE exposed. Running it still results in TF_WHILEFINISH error.

[2] Are we ready to do LOTs of Porting? What else need to be done? I do not have the overview. We get recommendations. How should we best proceed. Any suggestion/feedback? Anyone has proceed to deploy tensorflowSharp in routine and porting python code?

gmlwns2000 commented 7 years ago

I think we need some more platforms (mostly Xamarin. And I am currently working on it.) support is required before porting thousands of py codes.

JimSEOW commented 7 years ago

@gmlwns2000 tensorflow in iOS and here

tensorflow for android

Youtube 2017 link

It seems we are ready to create a simple Xmarin Forms example using Simple Test? Any one?

migueldeicaza commented 7 years ago

Hello,

I would love to see Workbooks used to explain, teach, explore and visualize TensorFlow. You are indeed correct that SampleTest contains ports of various programs that I found on the net, my goal there was to exercise the APIs that we have and make sure that they are usable. More of this work would be greatly appreciated!

Google has built a number of convenience libraries in Python that are not available to the C API (and by extension to the C#, Go, Java, Rust bindings), so we would need to port some of that code. In the neural network samples, these are typically the optimizer class (python/training/optimizer.py), and in some of the examples there, the concrete implementations for the Adam optimizer (tensorflow/tensorflow/python/training/adam.py).

TensorFlow comes with some convenience classes and functions for Python that would be useful to port, the code lives in tensorflow/python. Additionally, there are a couple of high-level frameworks that are worth porting:

I have also done about a fifth of a port of Keras to C#, but since it does not do much yet, I have not released it, I could release it, but it is in such a raw state, that it might be confusing to most. At this point, I think there is a lot more value in porting the core python functionality to TensorFlowSharp than completing KerasSharp.

JimSEOW commented 7 years ago

@migueldeicaza thanks for clarifying the challenges you face -in single-handedly pioneering the unknown into .NET wrapping tensorflow. It is unfortunate that there are many issues that are beyond your control. I assume no one has a clear overview as you in appreciating the different aspects of the challenges.

Many see an urgent future for the need for .NET deep learning - summarized here.

To strengthen the case for .NET as first class citizen for deep learning in NEAR FUTURE (by Q4 2017), we see many components have to come together. [a] Through Xamarin Forms ( deep learning code written in .NET can be deployed in multiple OSs and mobile platforms by Q4 2017: iOS/MacOS, Android, GTK(linux), UWP, WPF (W10) - as you put it, One GUI to rule all at Build 2017) - a strong justification to support production .NET codes for deploying deep learning every where.

[b] Always on connected mobile/portable cellular PC will soon be reality Q4 2017 through WinOnArm. Always on means AI learning 24x7. More reasons why we need .NET Deep Learning Urgent by Q4 2017.

=> My personal view is that you have pushed tensorflowSharp to a state that seems impossible a few months back.. Due to the urgent goal [among the users] to get .NET deep learning by Q4 2017, we need more hands and we can find these people NOW with CNTK. Perhaps the CNTK community will later contribute to push tensorflowSharp as alternative option to .NET deep learning. Perhaps this discussion already happens at Microsoft ... Then the future is bright :-)

JimSEOW commented 7 years ago

To be more specific, we are discussing suggestion raised by @migueldeicaza to explore if we could get help and support from people from pythonnet

larcai commented 7 years ago

I initiated a TF getting started guide in Xamarin workbooks. see https://github.com/larcai/cognibooks/tree/master/tensorflow

JimSEOW commented 7 years ago

@larcai Do you have some screen captures using Xamarin Workbook with Chart Library such as XPlot.Plotly? I believe the Workbook community would be delighted to learn that.

cesarsouza commented 7 years ago

Oh, I didn't realize there were already plans for a project called KerasSharp. I was about to start creating one myself.

larcai commented 7 years ago

Cesar, I've been thinking... You accord framework is GREAT! I think you could possibly port a lot of your Accord framework to work with TF#. That way you could benefit from the GPU acceleration capabilities in TF.

JimSEOW commented 7 years ago

@cesarsouza @larcai It is important at this stage we mobilize more passionate people to contribute. Microsoft need us to show strong interest in what we are doing to tip over to give more support for .NET for deep learning.

Could we focus on differentiating advantages?

[a] Make Xamarin Workbook Signature to the .NET deep learning community effort. We will figure out how to add Distinct features to Xamarin Woorkbook that makes it more integrated with the Microosft .NET Standard ecosystem. E..g OneNote, ink annotation ,etc.

[b] There are different .NET Machine Learning research groups fragmentally distributed. As a result, there is potential overlap and duplication. The vision of .NET Deep Learning using WorkBook should be the unifying platform that glue these fragmented groups TOGETHER.

.NET Deep Learning is significantly behind. We need to figure out how to coordinate these groups. We need to focus on use cases that are still not attempted by python tensorflow. E.g. Game scenario will be uniquely .NET.

=> Accord-NET is also an ideal platform to support users TRANSITION from legacy Machine Learning to Deep Learning. The tool for dissemination is through WorkBook

These are just suggestions. we need more feedback to figure out how to proceed forwards.

JimSEOW commented 7 years ago

@cesarsouza For KerasSharp, if you have done something, start sharing. E.g. We now have two tensorflow .NET github. It is likely that we will consolidate to TensorflowSharp.

LIkewise, for KerasSharp, if you have vison how to start, JUST DO IT. The sooner we get more people behind these projects, the more on track we can move forwards. We need diversity in the beginning. We can later consolidate.

migueldeicaza commented 7 years ago

@cesarsouza Like I said in my first comment, I think that there is value in doing some of the other higher-level bindings from Python for TensorFlow.