Keras.NET
Keras.NET copied to clipboard
BadImageFormatException
Hi, I'm running .Net 4.8 and python 3.8.6. When I try to run the first code, I get this exception.
Unhandled Exception: System.BadImageFormatException: Could not load file or assembly 'Python.Runtime, Version=2.5.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format. at Numpy.np.array[T](T[,] object, Dtype dtype, Nullable
1 copy, String order, Nullable1 subok, Nullable
1 ndmin)`
I've tried to install pythonnet_38 but no success. Does the Keras.Net support python version >3.7? What can I do to fix this?
Has anyone found a solution? I get the exact same error. I have tried different python installations, different pythonnet installations, setting the project to x86. I could produce that error on another computer with a new project, which only callsNDarray x = np.array(new double[]{ 589.1, 574.92}
Weirdly, the code works on my colleagues' computers. I suspect that something is wrong with the Python.Runtime.dll but I haven't found a solution.
@nadavbeno I got this error when used 32-bit version of python. Reinstalling to x64 solved my problem
Stale issue message