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

shape inference error in depthwise_conv #900

Open xianyuggg opened 3 years ago

xianyuggg commented 3 years ago

Platform: ubuntu

MMdnn version: 0.3.1

Source framework with version: Tensorflow 1.13.1

Pre-trained model: mobilenet_v1 from https://github.com/tensorflow/models/tree/master/research/slim/nets

Running scripts: mmtoir

Description: shape inference error in parsing depthwise_conv (converting from tf-slim model to IR file), the output shape's channel won't match with depthwise_conv's kernel channel

image

JiahaoYao commented 3 years ago

Have u ever tried this? https://github.com/microsoft/MMdnn/tree/master/mmdnn/conversion/tensorflow#frozen-graph-conversion

xianyuggg commented 3 years ago

Have u ever tried this? https://github.com/microsoft/MMdnn/tree/master/mmdnn/conversion/tensorflow#frozen-graph-conversion

Sorry I haven't tried this but it just seems the inferenced output shape for depthwise-conv got wrong mmtoir --srcFramework tensorflow -in ${ckpt_meta} -iw ${ckpt} --dstNodeName ${dst_node} -d ${dst_file_path}