Open dmagee opened 6 years ago
The error function is:
def dice_coefficient(x, y):
# average of per-channel dice coefficient
# global dice coefificnet doesn't work as class with larger region dominates the metrics
# https://en.wikipedia.org/wiki/S%C3%B8rensen%E2%80%93Dice_coefficient
intersection = C.reduce_sum(x * y, axis=(1,2))
denominator = C.plus(C.reduce_sum(C.relu(x), axis=(1,2)),C.reduce_sum(C.relu(y), axis=(1,2)),name="dcp")
denominator1 = C.plus(denominator,1,name="dcp2")
return C.reduce_mean(2.0 * intersection / (denominator1))
Which is created from scratch whether or not the model is loaded.
This is a strange error, as it only appears when a) reload and retrain a model b) when a particular line is added to the model..
Error:
model (snippet):
Whats really odd is: a) The code above works fine on initial model creation and re-load/re-train b) Uncomment two lines to add one more resnet layer (exactly the same as the other layers) you get the errors c) I've named all layers explicitly, but it still seems to be using arbitrary names?
Model Loading or creation is as:
it trains fine when model is created from scratch, but only the simpler version works if use_existing=True.
Environment: cntk 2.5.1 (latest installed via pip today), python 2.7.14, windows 10.
Thanks!