You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using .NET 4.8 and the latest nightly (Tensorflow.Keras 0.150.0-BERT-Model-46-g6a2d7e1c-nightly) and simply preparing Tensorflow.NumPy.NDArray data objects for Keras model fitting; it seems NDArray objects are created whose contents cannot be read properly:
float[] floatArray = [1f, 1.1f, 1.11f, 2f, 2.2f, 2.22f];
var targetShape = new Tensorflow.Shape(2, 3);
var tf_nd_array = new Tensorflow.NumPy.NDArray(floatArray, targetShape);
// simply reading value from row 0, column 0 will result in an exception
var value = tf_nd_array[0, 0];
The exception thrown when a value is read from the NDArray object is:
The type initializer for 'OnMethodBoundaryAspectCompile.MethodInfos' threw an exception.
Inner Exception:
FileNotFoundException: Could not load file or assembly 'System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
This exception seems related to the NuGet 'MethodBoundaryAspect.Fody' dependency and a reference to .NET 8, while this all is running under .NET 4.8.
Can anyone confirm what the last version of Tensorflow.Keras is that can run on .NET 4.8 ?
Reproduction Steps
No response
Known Workarounds
No response
Configuration and Other Information
Tensorflow.Keras 0.150.0-BERT-Model-46-g6a2d7e1c-nightly
.NET 4.8
Windows 10
The text was updated successfully, but these errors were encountered:
I reverted back to just using the 'official' latest Tensorflow.Keras v. 0.15 which doesn't have this issue.
There is one other problem though with the NuGet Tensorflow.Keras v. 0.15 / Tensorflow.NET v 0.150 versions - model.save() does not work and results in an error under .NET 4.8.
However as suggested by https://github.com/SciSharp/TensorFlow.NET/issues/1246#issuecomment-2134968838 just downloading the Github Repo and building and/or repackaging yourself solve this model.save() issue - somehow the DLL files produced when doing a custom build results in different DLL files from those available on NuGet.
So now I got it all working with (custom) packaged Tensorflow.Keras v. 0.15 and .NET 4.8 - thanks for very valuable input on this forum.
Description
Using .NET 4.8 and the latest nightly (Tensorflow.Keras 0.150.0-BERT-Model-46-g6a2d7e1c-nightly) and simply preparing Tensorflow.NumPy.NDArray data objects for Keras model fitting; it seems NDArray objects are created whose contents cannot be read properly:
The exception thrown when a value is read from the NDArray object is:
This exception seems related to the NuGet 'MethodBoundaryAspect.Fody' dependency and a reference to .NET 8, while this all is running under .NET 4.8.
Can anyone confirm what the last version of Tensorflow.Keras is that can run on .NET 4.8 ?
Reproduction Steps
No response
Known Workarounds
No response
Configuration and Other Information
Tensorflow.Keras 0.150.0-BERT-Model-46-g6a2d7e1c-nightly
.NET 4.8
Windows 10
The text was updated successfully, but these errors were encountered: