-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] convert model for 1D inputs #1529
Comments
@pfeatherstone actually had a use case for doing this for 3d come up recently, think it might be a need extension, would make sense to cover 1d as well if I did that, curious what the use case is/was? |
I regularly build classifier models and feature extractors for 1D time series |
So far i have this conversion function:
This works for |
This works with a lot of CNN models. Maybe the better approach would be to have a flag in |
@pfeatherstone thanks for sharing that snippet, I think initial approach would be to try as a helper that mutates an existing model like above, adding arguments through the create_model fn is a bigger commitement that adds long term maintenance burden if it doesn't end up being used much... |
I have to say, the results were really poor. The better option was to concert my 1D data into 2D by using torch.stft() then using a normal 2D model... |
Tried this again optimistically thinking I would get better results. Nope... |
Is there a way to convert timm models for 1D inputs?
I realize that a 1D tensor with shape [B,C,S] can be reshaped to [B,C,1,S] or [B,C,S,1], but then the filters are unnecessarily large.
Maybe for transformer models this is easier since patch embeddings are linearized but it would be cool if CNNs could also be converted to 1D.
Cheers
The text was updated successfully, but these errors were encountered: