SciSharp / SciSharp-Stack-Examples

Practical examples written in SciSharp's machine learning libraries
http://scisharpstack.org
Apache License 2.0
319 stars 103 forks source link

Support .NET 6 #62

Closed jimn-purecars closed 1 year ago

jimn-purecars commented 2 years ago

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:

Oceania2018 commented 2 years ago

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

Oceania2018 commented 1 year ago

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

jimn-purecars commented 1 year ago

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:

Oceania2018 commented 1 year ago

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

jimn-purecars commented 1 year ago

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!