Load module in python
Hi,
I'm trying load a model in python code via load_model() function. My model is not saved using save_model() python function, it's saved using brainscript. When I try to load my previously created model I'm getting this error
Value error: The convolution map should have at least as many axes as the shape of the input it operates on.
Can I make it work somehow?
Hi,
Which version of CNTK are you using? Is it possible to share your brainscript file?
Sure thing. Here's link to my files on OneDrive https://1drv.ms/f/s!As_qGuBAm_dbiNldCItxglz_ELfz1A. I downloaded and built the project yesterday, so the last version, but the model is created on October. Could that be a problem?
Thanks, can you share the saved model also?
Yes, https://mega.nz/#F!mo9RCSxJ!d6fuR5jSTTf9HCW9nulktQ. There** are two models, one from September and one from yesterday. I tried to make a new model just for sure but the error is still the same.
I get the same thing with the c++ interface (reported in #1179)
Can you share them from a location in which I can download them for free? Such us Onedrive, googledrive...etc?
I's sorry. Here's an other link to models. https://drive.google.com/drive/folders/0B2rkLUa399G-WVZtNkstclZ0d28?usp=sharing
@Arminea Thanks for sharing the model. There was a bug which is now fixed in master. But you might have to wait until the next release, if you do not want to build Python wheels from master by yourself.
Sorry for the inconvenience.
@zhouwangzw It works perfectly :) Thank you. A have another little question. I wanted to find output node in my model (https://github.com/Microsoft/CNTK/wiki/Evaluate-a-saved-convolutional-network so I printed them with
for index in range(len(z.outputs)):
print("Index {} for output: {}.".format(index, z.outputs[index].name))
But my output does not contain Index 2 as it is in the tutorial.
Index 0 for output: ce.
Index 1 for output: errs.
Should I change something in my brain script? The link to my files is above from 10 days ago.
It seems that your model does define any output node. Please define "outputNodes = (xxx) " in your config.
@zhouwangzw It works now. But my only change was
OutputNodes = o1 -> outputNodes = (o1)
Is this change so significant?
@Arminea yes, Brainscript is case sensitive. https://github.com/Microsoft/CNTK/wiki/Deal-with-the-'No-Output-nodes-found'-error
@zhouwangzw Now I feel really stupid :D Thanks again. Closing issue.
@zhouwangzw Hi, sorry for opening this issue again but is it possible that something went wrong with the Linux version? On Friday, I updated to beta 10 version and I'm getting the same error. If I build the project for windows myself it's fixed.
@Arminea If I remember correctly, the fix is available in Beta 11. Could you please try with the latest Beta 11?
@zhouwangzw You were right. It is in Beta 11 release :)