Closed ekleiman22 closed 3 years ago
I tried to use your fixed file but it does not pass compilation. For example: in Web.Download Web is unknown (in original version you use Utility.Web.Download). So I did the only correction: I added tf.compat.v1.disable_eager_execution(); in method Run as you did. And now it works.
Are you sure it's the latest version on your local?
How can I check it? I did according to https://github.com/SciSharp/SciSharp-Stack-Examples. According this I did: dotnet run --project src/TensorFlowNET.Examples I use Microsoft Visual Studio Community 2019. I executed instructions (yesterday):
PM> Install-Package TensorFlow.NET
PM> Install-Package TensorFlow.Keras
PM> Install-Package SciSharp.TensorFlow.Redist
I see in packages: TensorFlow.Keras(0.1.0) TensorFlow.NET (0.30.0) SciSharp.TensorFlow.Redist (2.3.1)
I did all possible updates using NuGet Manager. Now I see in the list of Nuget manager installed packages: TensorFlow.Net v0.31.1 TensorFlow.Keras v0.2.1 SiSharp.TensorFlow.Redist v2.3.1 But now the project TensorFlowNet.Examples does not pass compilation. I get 10 errors such as Error CS1061 'LayersApi' does not contain a definition for 'conv2d' and no accessible extension method 'conv2d' accepting a first argument of type 'LayersApi' could be found (are you missing a using directive or an assembly reference?) TensorFlowNET.Examples C:\Users\eug10\source\repos\SciSharp-Stack-Examples-master\src\TensorFlowNET.Examples\TextProcessing\cnn_models\VdCnn.cs
CS1061 'LayersApi' does not contain a definition for 'conv2d' and no accessible extension method 'conv2d' accepting a first argument of type 'LayersApi' could be found (are you missing a using directive or an assembly reference?) TensorFlowNET.Examples C:\Users\eug10\source\repos\SciSharp-Stack-Examples-master\src\TensorFlowNET.Examples\TextProcessing\cnn_models\WordCnn.cs 52 Active
Error CS1061 'LayersApi' does not contain a definition for 'batch_normalization' and no accessible extension method 'batch_normalization' accepting a first argument of type 'LayersApi' could be found (are you missing a using directive or an assembly reference?) TensorFlowNET.Examples C:\Users\eug10\source\repos\SciSharp-Stack-Examples-master\src\TensorFlowNET.Examples\TextProcessing\cnn_models\VdCnn.cs 151 Active
Can you try to fork a clean version of the example project?
Now all examples work. Thank you very much
I downloaded yours TensorFlowNET.Examples and try to check all examples. In example #18 in class ImageRecognitionInception in method ReadTensorFromImageFile I got an error "Object reference not set to an instance of an object." on the line return sess.run(normalized); How to resolve this problem?