The error is different for the same input
I get different error for the same input. What kind of explanation could it be?
Could you clarify--you run the same experiment twice, and get different outputs? Could you paste into this thread the relevant sections of the two log outputs?
(I am about to merge a change that removes a non-reproducibility caused by atomicAdd(). If your output only varies slightly, this may be the cause.)
I have a text file with two same lines for input. I also generated a network to classify data from such input files. But, when I run classification, I get different classification: -2.089206 4.216597 -0.821852 2.788121
The numbers stay the same even if I run the experiment next time with the same input, so we cannot explain it by some random initialization or other unpredictable things.
This should not happen indeed. I can only imagine that some training configuration leaked in, such as Dropout still enabled, although all those kinds of nodes are aware of training vs. testing.
It's a little difficult to work with Dropbox. Could you just paste your network and reader configs here?
How do you test?
Could you also confirm the version you are using?
(BTW the fix for non-atomic-add is now in master, but I don't think it will solve your issue.)
Network.zip Here is my network, could you please run it to check if you also get different numbers for the same network, if there is a problem on my side. In general, I found out that testing results depend on the minibatchSize, so maybe there is some connection to the gpu usage.
I am using your binaries 1.1 which were released several weeks ago.
I will take a look, but just to make sure we are using the same setup: how did you get the outputs? Was it through API (EvalDll) or write command in CNTK?
I used write command in CNTK
In your write command, do you have
NDLNetworkBuilder = [
..
]
? If so, remove it and try again.
No, I do not use this command. Here is the test file
I have already changed the input image size, but do not take this into account, it was as in training file.
It looks like the test file is from a different network as it has different dimensions in the reader section (625) vs train (441). But even after I updated the file, I could not run it using the latest version from master, I'm getting this error:
EXCEPTION occurred: Node 'features3' (InputValue operation): TensorView: Shape bounds [0,882) exceed bounds of underlying storage object [0,441)
BTW, I've noticed that in your NDL you are using this:
FeatureNodes = (features1)
Shouldn't it rather be:
FeatureNodes = (features1, features2, features3)
?
Yes, that is true that I already changed the test file. Sorry. It should be:
features1 = [
dim = 441
start = 1
]
features2 = [
dim = 441
start = 442
]
features3 = [
dim = 441
start = 883
]
Regarding FeatureNodes, should it affect the classification error? Nevertheless, thank you for this information, I will modify the FeatureNodes field
Ok, so I was able to repro your issue by using our binary release bits. It looks like we have fixed the error reporting since then. Any chance you can try our latest master bits? And yes, please either tag Input nodes with tag="feature" or include them in the FeatureNode list.
Thank you, I will try this. When I try to add features2, features3 to FeatureNodes I got an error:
NotifyFunctionValuesMBSizeModified: features2 InputValue operation had its row dimension 441 changed by the reader to 21.
Is it possible to use several 2D matrices for FeatureNodes?
Hmm, something is not right here: it looks like the reader is not reading all the features for some reason, It should be possible to have more than one ImageInput nodes, there should really be no difference. Let me check that tomorrow though.
A reasonable question would be if FeatureNodes = (features1) means that features2 and features3 will contain only zeros?
As the last measure, we can use Reshape function. In general, I think that Reshape may be a workaround for a lot of tricky cases like this.
Yes, from what I see in the code, if a node is not tagged or included into special nodes, it will be ignored.
And how to make FeatureNodes accepting several ImageInputs? It looks like Reshape does not help much.
Ok, I think I found a so-called "crutch" to avoid this issue.
features1 = ImageInput(63, imageH, 1, imageLayout=$imageLayout$)
feature1_Im = RowSlice(0, imageH, features1)
feature2_Im = RowSlice(imageH, imageH, features1)
feature3_Im = RowSlice(42, imageH, features1)
........
FeatureNodes = (features1)