Closed RPastorino closed 6 years ago
Hi @RPastorino, could you try to modify the command
-im /pathToModel/myModel.h5
-->
-iw /pathToModel/myModel.h5
Hi @kitstar, Thanks for your reply! with -iw it seems to try to convert the model. Now i have an issue with caffe that it ain't imported and the shell displays me: ImportError: No module named caffe Btw, thanks again
I can confirm that with keras and caffe well installed the mmconversion: mmconvert -sf keras -iw /pathToModel/myModel.h5 -df caffe -om /pathToModel/myModel.prototxt works fine
Platform (like ubuntu 16.04/win10): macOS High Sierra 10.13.4
Python version: 2.7.14
Source framework with version (like Tensorflow 1.4.1 with GPU): keras 2.1.6
Destination framework with version (like CNTK 2.3 with GPU): caffe
Pre-trained model path (webpath or webdisk path):
Running scripts: mmconvert -sf keras -im /pathToModel/myModel.h5 -df caffe -om /pathToModel/myModel.prototxt
This is the error trace I got.
/Users/riccardopastorino/anaconda2/lib/python2.7/site-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from
sys.exit(_main())
File "/Users/riccardopastorino/anaconda2/lib/python2.7/site-packages/mmdnn/conversion/_script/convert.py", line 95, in _main
ret = convertToIR._convert(ir_args)
File "/Users/riccardopastorino/anaconda2/lib/python2.7/site-packages/mmdnn/conversion/_script/convertToIR.py", line 39, in _convert
parser = Keras2Parser(model)
File "/Users/riccardopastorino/anaconda2/lib/python2.7/site-packages/mmdnn/conversion/keras/keras2_parser.py", line 104, in init
assert False
AssertionError
float
tonp.floating
is deprecated. In future, it will be treated asnp.float64 == np.dtype(float).type
. from ._conv import register_converters as _register_converters Using TensorFlow backend. Traceback (most recent call last): File "/Users/riccardopastorino/anaconda2/bin/mmconvert", line 11, inthe model is a simple MNIST classifier with few reLUs' layers and a softmax layer