Open dmagee opened 6 years ago
Update: the error reported above changes when more DLLs are copied (I'd only copied the core dll for the debug build). Once that's done the real error is:
Assertion failed: convolutionMapVar.IsConstant() || convolutionMapVar.IsParameter(), file c:\repos\cntk\source\cntkv2librarydll\backcompat.cpp, line 364
I think this is probably down to the way the 3x3 convolution kernel is constructed in the brainscript of this network (which is not in the networks that load)?
# Convolve with '1 1 0
# 1 1 0
# 0 0 0'
W1 = ConstantTensor (1, (2:2))
WP1 = ConstantTensor (0, (2:1))
WP2 = ConstantTensor (0, (1:3))
WW=Splice(W1:WP1, axis=2)
W=Splice(WW:WP2, axis=1)
c1 = Convolution (W, up_fake, (3:3:1), mapDims = 1, stride = 1, sharing = true, autoPadding = true, lowerPad = 0, upperPad = 0, imageLayout = "cudnn")
W indeed is not a constant or parameter explicitly, but is a perfectly valid kernel that works fine in cntk.exe. I've confirmed this is the issue with a few print statements in the cntk code.
There are some limitations in loading legacy models, and this is one of them unfortunately. I think the workaround is to edit the model and replace W with a constant.
The reason it was like that as I could not find a way of creating a 2D constant with varying values. Hence the concatenation of several constant valued constants.
I've previously (for other models) been able load legacy models generated by cntk.exe into c++ programs using:
I have a particular (quite big UNET like) model that causes the cntk based programs to throw an exception.
Call stack:
The exception appears to be at line 112 of Sequences.h:
Unhandled exception at 0x0000000000000000 in QuantifyByAppearanceFast.exe: 0xC0000005: Access violation executing location 0x0000000000000000.
I'm using cntk 2.5, windows 10, and vs2017 (cntk compiled from source). The model is at:
https://drive.google.com/open?id=1qMNatDi8G_JAzaoITCMF4gKEFYNrflhj
The model works fine with cntk.exe on the same machine (quad i7, 16gb, nvidia 1080).
Thanks for any help!
D.