SciSharp-Stack-Examples icon indicating copy to clipboard operation
SciSharp-Stack-Examples copied to clipboard

Support .NET 6

Open jimn-purecars opened this issue 3 years ago • 1 comments

The FullyConnectedKeras example in the TensorFlowNET.Examples project runs properly with a target framework of net5.0, with an accuracy around 95%. But if you change the target framework to net6.0, the accuracy plummets to <10%. It isn't clear what the root cause is.

I discovered this when I tried to transplant this code to my .NET 6 project. It appears there is some sort of regression or bug that is tanking the accuracy in .NET 6 only.

Steps to Reproduce:

  • Change the TargetFramework of the TensorFlowNET.Examples project from net5.0 to net6.0.
  • Clean, rebuild, and run the Fully Connected Neural Network (Keras) example.
  • Observe accuracy has dropped to ~0.098.

jimn-purecars avatar Jan 01 '22 23:01 jimn-purecars

Same issue ad https://github.com/SciSharp/TensorFlow.NET/issues/880. I still havn't figured it out.

Oceania2018 avatar Jan 02 '22 18:01 Oceania2018

@jimn-purecars It's been fixed for the latest update. Please pull the code and confirm, thanks.

Oceania2018 avatar Nov 10 '22 13:11 Oceania2018

Hello, I am trying to confirm, but unable to build the solution. When I clone the repository, and load SciSharp STACK Examples.sln, there are several projects that are referenced that do not exist in the repository. It is not clear where to get these from, and I don't see them mentioned in the README.md:

  • Tensorflow.Binding.csproj
  • Tensorflow.Keras.csproj
  • SciSharp.Models.TimeSeries.csproj
  • SciSharp.Models.Core.csproj

jimn-purecars avatar Nov 18 '22 16:11 jimn-purecars

You can find them all in below repos: https://github.com/SciSharp/TensorFlow.NET https://github.com/SciSharp/SciSharp.Models

Oceania2018 avatar Nov 18 '22 16:11 Oceania2018

I have successfully run using .net 6 as well as .net 7 and the accuracy is > 0.96 in both cases.

I also had to get and add Pandas.NET to the .sln file in order to build and run. It is probably worth officially adding this project to the solution, and including directions on how to set all of this up these external projects in the example readme.

Thanks for the fix!

jimn-purecars avatar Nov 19 '22 00:11 jimn-purecars