SciSharp / SciSharp-Stack-Examples

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

Something is wrong with the updated nuget packages #72

Closed Darlanio closed 1 year ago

Darlanio commented 1 year ago

There seems to be something wrong with the nuget packages.

I upgraded to SciSharp.Tensorflow.Redist-Windows-GPU 2.10.0 TensorFlow.Keras 0.10.0 TensorFlow.NET 0.100.0

and use the code from the example MnistGAN.cs in https://github.com/SciSharp/SciSharp-Stack-Examples/tree/master/src/TensorFlowNET.Examples/GAN

Code compiles, but:

214292303-acf5d736-18f4-49d2-bd07-1311f318264a

There is only a few changes to the code in MnistGAN.cs to allow it to compile: 214294946-412d6708-6704-4001-b76a-1e8540074be0

What is strange is that the code works just fine if code is compiled using all the source from SciSharp repositories, but when using the NuGet packages, it fails to improve.

Let me know if I made an error. My code is available here: https://github.com/Darlanio/TensorFlowNetUpdatedGAN

Darlanio commented 1 year ago

Related to issue: https://github.com/SciSharp/SciSharp-Stack-Examples/issues/71#issuecomment-1383432284

Darlanio commented 1 year ago

The error can be seen with

    Console.WriteLine("D:" + D.TrainableVariables.Count());
    Console.WriteLine("G:" + G.TrainableVariables.Count());

D reports 12 G reports 8 with SciSharp-repositories, but 0 with NuGets.

Darlanio commented 1 year ago

I have also tested to copy the DLL-files Tensorflow.Binding.dll and Tensorflow.Keras.dll from the solution using SciSharp-repositories into the folder of the NuGet-packaged compiled binaries, replacing those same dll-files - and then it works. Clearly something is wrong with the nugets now published.

Since it only affects the generator, I guess it relates to Sequential Model somehow.

Oceania2018 commented 1 year ago

The error can be seen with

    Console.WriteLine("D:" + D.TrainableVariables.Count());
    Console.WriteLine("G:" + G.TrainableVariables.Count());

D reports 12 G reports 8 with SciSharp-repositories, but 0 with NuGets.

The TrainableVariables is a problem. I'll take a look.