-
Notifications
You must be signed in to change notification settings - Fork 686
Add support for torch op conv1d #1753
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Looking at the PyTorch ops we support, we are missing support for However the following works: import coremltools as ct
import torch
m_torch = torch.nn.Conv1d(16, 33, 3)
x = torch.randn(20, 16, 50)
m_torch = torch.jit.trace(m_torch, x)
m_cm = ct.convert(m_torch, inputs=[ct.TensorType(shape=x.shape, name="x")])
m_cm.predict({'x': x}) The Can someone provide a toy example where our lack of |
With this https://gist.github.com/fursund/39c897d25f583686fe2626c56b48ffa3 and coremltools 6.2 it will hit the conv1d op |
Best bet is that it has something to do with: https://asteroid.readthedocs.io/en/v0.3.1/_modules/asteroid/filterbanks/enc_dec.html#Encoder |
Did you mean to share a different link? The error here is not related to conv1d.
There is quite a bit of code on this page. None of it is using coremltools. Can you provide a minimal example were conversion fails because we do not support conv1d? |
Ok. Tried to reduce the issue a bit: import coremltools as ct
import torch
from asteroid_filterbanks import Encoder, ParamSincFB
m_torch = Encoder(
ParamSincFB(
80,
251,
stride=1,
sample_rate=16000,
min_low_hz=50,
min_band_hz=50,
)
)
print(m_torch)
x = torch.randn(10, 1, 1024)
m_torch = torch.jit.trace(m_torch, x)
m_cm = ct.convert(m_torch, inputs=[ct.TensorType(shape=x.shape, name="x")]) |
Thanks @fursund. After running Looks like there is still a lot going on inside of |
Yeah. Not involved in that project, but when I get a moment I'll try and make the test even more barebones. |
Did anyone make progress on this? I was trying to convert titanet but failed with this issue. |
coremltools is missing conv1d support for torch
The text was updated successfully, but these errors were encountered: