ceccocats / tkDNN

Deep neural network library and toolkit to do high performace inference on NVIDIA jetson platforms
GNU General Public License v2.0
718 stars 209 forks source link

mnist example #128

Closed yaojiunn closed 3 years ago

yaojiunn commented 4 years ago

Thank you for creating a useful library. Your test program of mnist mnist_model.py only extract input.bin & output.bin. Is that possible to obtain c0.bin, c1.bin, d2.bin, d3.bin from a trained caffe model?

mive93 commented 4 years ago

Hi @yaojiunn Check here for the weights: https://github.com/ceccocats/tkDNN/blob/master/tests/exporters/caffe_weights_exporter.py.

yaojiunn commented 3 years ago

@mive93 Thank you for your answering. After running the python code you offered above, I got 8 bin files bellow:

Convolution0.bias.bin, Convolution0.bin, Convolution1.bias.bin, Convolution1.bin, InnerProduct2.bias.bin, InnerProduct2.bin, InnerProduct3.bias.bin, InnerProduct3.bin

I'm not sure which 4 bin files match the 4 bin files used in your example code (c0.bin, c1.bin, d2.bin, d3.bin). Could you please give me a hint? Thank you!

Eugene-1995 commented 3 years ago

Hi @mive93, how to let the output bin files of caffe_weights_exporter.py (including weights & bias) fit your mnist sample code (seems no bias)?

mive93 commented 3 years ago

In tkDNN weights format bias and batchnorm are included in the convolutional weights, if that was the question. Closing for now, feel free to reopen.