Hello,
I am trying to convert a small darknet-based cnn (originating from https://github.com/ashitani/darknet_mnist, working on the mnist dataset) to ELL.
I trained the darknet-model and afterwards followed the tutorial on this page for converting darknet models to ELL. After training and before converting I removed the cost-layer and the dropout-layer from the original darknet-model before converting, as they are used for training only as far as I have understood. (I did this because at first the darknet cost layer gave me a warning message during conversion - "sse not known" or something like that - and the dropout layer also seemed not to be converted into the ELL model).
After figuring out that I need to feed the mnist images not in the color channel range [0..1] (as in the darknet-framework) but [0..255] (as the ELL model automatically includes a scaling layer), I run the model on the same mnist images in the darknet- and ELL-framework. I checked that both models get the same array / vector (2352 float values, 28x28x3 values) of values in the same order (beside the scaling mentioned above).
The problem is, that I get very different prediction results from the models. E.g the darknet model gives me on one image a 93% for the most probably class (which is the right one), whereas the converted ELL-model gives only 17% for that class - it is still the most probable, but I would expect to get prediction results which are much closer to each other, as the model structure and weights should be (nearly) the same?
result of darknet-model:
data/mnist/images/v_01862_c4.png: Predicted in 0.054000 seconds.
c4: 0.933212
c9: 0.046099
c8: 0.008588
c5: 0.003347
c7: 0.002880
result of model converted to ELL:
D:\Crest\Libs\darknet_mnist\data\mnist\images\v_01862_c4.png
(17%) 4 (16%) 1 (12%) 9 (11%) 5 (11%) 3
Mean prediction time: 7ms/frame
Right now I have no idea what can cause this huge difference and where to look further.
I have attached the original darknet-cfg file (mnist_lenet.cfg) as well as the one used for converting and doing the inference in darknet (mnist_lenet.nodropout_nocost.cfg) and the converted ELL-file (I have removed the weights from that file, otherwise it would have 40 MB).
mnist_lenet.cfg.txt
mnist_lenet.nodropout_nocost.cfg.txt
mnist_lenet_woweights.ell.txt
Thank you very much,
Sven
Hello,
I am trying to convert a small darknet-based cnn (originating from https://github.com/ashitani/darknet_mnist, working on the mnist dataset) to ELL.
I trained the darknet-model and afterwards followed the tutorial on this page for converting darknet models to ELL. After training and before converting I removed the cost-layer and the dropout-layer from the original darknet-model before converting, as they are used for training only as far as I have understood. (I did this because at first the darknet cost layer gave me a warning message during conversion - "sse not known" or something like that - and the dropout layer also seemed not to be converted into the ELL model).
After figuring out that I need to feed the mnist images not in the color channel range [0..1] (as in the darknet-framework) but [0..255] (as the ELL model automatically includes a scaling layer), I run the model on the same mnist images in the darknet- and ELL-framework. I checked that both models get the same array / vector (2352 float values, 28x28x3 values) of values in the same order (beside the scaling mentioned above).
The problem is, that I get very different prediction results from the models. E.g the darknet model gives me on one image a 93% for the most probably class (which is the right one), whereas the converted ELL-model gives only 17% for that class - it is still the most probable, but I would expect to get prediction results which are much closer to each other, as the model structure and weights should be (nearly) the same?
result of darknet-model:
data/mnist/images/v_01862_c4.png: Predicted in 0.054000 seconds.
c4: 0.933212
c9: 0.046099
c8: 0.008588
c5: 0.003347
c7: 0.002880
result of model converted to ELL:
D:\Crest\Libs\darknet_mnist\data\mnist\images\v_01862_c4.png
(17%) 4 (16%) 1 (12%) 9 (11%) 5 (11%) 3
Mean prediction time: 7ms/frame
Right now I have no idea what can cause this huge difference and where to look further.
I have attached the original darknet-cfg file (mnist_lenet.cfg) as well as the one used for converting and doing the inference in darknet (mnist_lenet.nodropout_nocost.cfg) and the converted ELL-file (I have removed the weights from that file, otherwise it would have 40 MB).
mnist_lenet.cfg.txt
mnist_lenet.nodropout_nocost.cfg.txt
mnist_lenet_woweights.ell.txt
Thank you very much,
Sven