Open whaozl opened 7 years ago
@whaozl I think I have the same question. I want to be able to train my models in python, using Keras library with the CNTK backend. Then I would like to evaluate the trained model in a C# application using new real-time data. Is this even possible?
What I've done so far:
Using Keras+CNTK, I've trained a model which seems to perform well.
Tried saving the Keras model so that I can load it in C# application:
cntk.combine(model.outputs).save('my_cntk_model')
Tried to load that model in a C# console application (where I installed the CNTK.GPU NuGet package):
Function.Load("my_cntk_model", CNTK.DeviceDescriptor.CPUDevice)
when I try debugging this line of code, an exception occurs:
BadImageFormatException was unhandled An unhandled exception ocurred in mscorlib.dll Additional information: Could not load or assembly 'Cntk.Core.Managed-2.1 ... An attempt was made to load a program with an incorrect format.
I have the same problem.
Is there a plan to solve this problem? @cha-zhang
Keras save on its own format which isn't supported by CNTK. @souptc can we access the underlying CNTK graph from Keras?
We don't have solution to this problem ?
I have this problem too. I tried saving and loading in C# ecosystem. It gave the same error
Can you load the model through Python? BadImageException is usually because of mix and match between x64 and x86.
"Can you load the model through Python? BadImageException is usually because of mix and match between x64 and x86." I can do it with CNTKv2 version in python. However I want it to be in C# and with ONNX version.
Hi @CWD4RKC0D3R , this just for testing.