tianrengao / SqueezeWave

Other
254 stars 50 forks source link

convert squeezewave model to pytorch script for C++ inference. #7

Open alokprasad opened 4 years ago

alokprasad commented 4 years ago

Any idea how to convert squeezewave model to pytorch script and relevant c++ code for loading and inferencing from same.

BohanZhai commented 4 years ago

You might try to use the script used to convert torch to onnx provided for WaveGlow, I tried before but fail to convert the onnx to caffe2.

chenht2021 commented 4 years ago

You might try to use the script used to convert torch to onnx provided for WaveGlow, I tried before but fail to convert the onnx to caffe2.

I try to export the model to onnx, but always got "of traced region did not have observable data dependence with trace inputs". Then I read the script used to convert torch to onnx provided for WaveGlow. I rewrite the script to handle squeezewave model, but failed. I think I mess the depthwise pointwise conv1d to conv2d. Can you give some suggestions?

alokprasad commented 4 years ago

Yes, that's the problem with pytorch , models are very difficult to convert to onnx/caffe or torch script. even if we are able to c/c++ code do not produces right output with that.

turian commented 3 years ago

@alokprasad why? Doesn't torch now have native methods to export ONNX models?