microsoft / MMdnn

MMdnn is a set of tools to help users inter-operate among different deep learning frameworks. E.g. model conversion and visualization. Convert models between Caffe, Keras, MXNet, Tensorflow, CNTK, PyTorch Onnx and CoreML.
MIT License
5.78k stars 968 forks source link

MXNet Parser has not supported operator Crop with name crop0 #907

Open luan1412167 opened 3 years ago

luan1412167 commented 3 years ago

Platform (like ubuntu 16.04/win10): 18.04

Python version: 3.6

Source framework with version (like Tensorflow 1.4.1 with GPU): MXNET Destination framework with version (like CNTK 2.3 with GPU): Tensorflow Pre-trained model path (webpath or webdisk path): mnet.25 https://drive.google.com/drive/folders/1OTXuAUdkLVaf78iz63D1uqGLZi4LbPeL Running scripts: mmconvert -sf mxnet -in ~/.insightface/models/retinaface_mnet025_v1/mnet10-symbol.json -iw ~/.insightface/models/retinaface_mnet025_v1/mnet10-0000.params -df tensorflow -om tf_retinaface_mnet_v1 --inputShape 3,480,640 --dump_tag SERVING

The error with MMDNN lastest release


Warning: convert the null operator with name [data] into input layer.
Warning: MXNet Parser has not supported operator Crop with name crop0.
Traceback (most recent call last):
  File "/home/dmp/Silent-Face-Anti-Spoofing/luandd/bin/mmconvert", line 8, in <module>
    sys.exit(_main())
  File "/home/dmp/Silent-Face-Anti-Spoofing/luandd/lib/python3.6/site-packages/mmdnn/conversion/_script/convert.py", line 102, in _main
    ret = convertToIR._convert(ir_args)
  File "/home/dmp/Silent-Face-Anti-Spoofing/luandd/lib/python3.6/site-packages/mmdnn/conversion/_script/convertToIR.py", line 120, in _convert
    parser.run(args.dstPath)
  File "/home/dmp/Silent-Face-Anti-Spoofing/luandd/lib/python3.6/site-packages/mmdnn/conversion/common/DataStructure/parser.py", line 22, in run
    self.gen_IR()
  File "/home/dmp/Silent-Face-Anti-Spoofing/luandd/lib/python3.6/site-packages/mmdnn/conversion/mxnet/mxnet_parser.py", line 263, in gen_IR
    self.rename_UNKNOWN(current_node)
  File "/home/dmp/Silent-Face-Anti-Spoofing/luandd/lib/python3.6/site-packages/mmdnn/conversion/mxnet/mxnet_parser.py", line 374, in rename_UNKNOWN
    raise NotImplementedError()
NotImplementedError
cookieli commented 3 years ago

Thank you for your issues. We are sorry that we didn't add this op for mmdnn, we will fix it soon.

saeedkhanehgir commented 3 years ago

Hi @cookieli I have same problem, thanks for your checking.