migueldeicaza / TensorFlowSharp

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

TensorFlowRuntimeVersion version support (1.14/1.15/2.0) #464

Open fhoering opened 4 years ago

fhoering commented 4 years ago

Is your feature request related to a problem? Please describe. Currently TensorFlowSharp only supports TensorFlow runtime 1.12 which starts getting old (6 of November 2018)

Is it possible to publish new nugets with newer TensorFlow versions ?

Describe the solution you'd like

The easiest would be probably to publish one nuget per TensorFlow runtime (1.14, 1.15, 2.0). See https://pypi.org/project/tensorflow/#history

And keeping 2 nugets maintained

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

fhoering commented 4 years ago

Just saw that 1.14 is in progress https://github.com/migueldeicaza/TensorFlowSharp/pull/449. Nice. But this ticket still applies for 1.15 and 2.0

migueldeicaza commented 4 years ago

I will update a new version with the newer TEnsorFlow in the 1.x series

The 2.x series needs some additional review.

fhoering commented 4 years ago

OK. Thanks.

Indeed 2.0 is breaking as for example tf.Session disappears. On my side it is not as important.

If there could be one nuget for 1.14 and also one for 1.15 it would be nice (1.15 and 1.14 are quite different actually, not on API side but 1.15 for example embarks all that is needed for GPU support - what was previously in tensorflow-gpu)

migueldeicaza commented 4 years ago

Version 1.15.0-pre1 has been published, would love for folks to test it, and if we like it, I can drop the "pre1" from the version and make it the official one.

migueldeicaza commented 4 years ago

I rather not have to maintain 1.14, 1.15 and 2.0 versions.

I generated the 1.15 API, I am not sure I understand what this means:

not on API side but 1.15 for example embarks all that is needed for GPU support

migueldeicaza commented 4 years ago

Well, I am glad I did not make 1.15.0-pre1 the default, it includes the new runtime, but still has the old API, I did not commit that branch from home.

fhoering commented 4 years ago

OK. Thanks. 1.15 should be fine.

I meant this with my comment but except package size it shouldn't change too much.

From https://github.com/tensorflow/tensorflow/releases

Release 1.15.0 As announced, tensorflow pip package will by default include GPU support (same as tensorflow-gpu now) for the platforms we currently have GPU support (Linux and Windows). It will work on machines with and without Nvidia GPUs. tensorflow-gpu will still be available, and CPU-only packages can be downloaded at tensorflow-cpu for users who are concerned about package size.

migueldeicaza commented 4 years ago

OH MY GOD THIS IS BEAUTIFUL! I love this!

I was going down a path at some point to have every invocation replicated twice, to avoid this. And now it is out of the box.

The 1.15.0-pre2 package has been pushed to NuGet, it should be live soon, and hopefully people can take this for a spin.