-
Notifications
You must be signed in to change notification settings - Fork 60
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
AttributeError: 'ASTModel' object has no attribute 'unfold' #28
Comments
Update: I'm still getting the same error using the same code with Python 3.7.4 on an Ubuntu laptop, so it doesn't seem that the python or module versions are the issue. |
did you change anything from my code? |
Aside from the "module management" section in the quoted code snippet, I have not. |
Yes, I can run the AST Colab script perfectly on my end. |
This looks like a package version issue, either with torch or timm. What is the version of your timm package? It has to be 0.4.5 |
My timm package is 0.4.5. I think I'm seeing the cause for the error. Below is your ast_models.py file with a few lines I added (tagged with "# added !!"). It seems that when
You may notice that I'm getting the errors when running the code you commented out at the end of this snippet. Perhaps its code I should not be using. My main objectives are (i) to be able to fine-tune the model with the I have been using CNNs to classify audio recordings, and I am really intrigued with the ability to have self-supervised audio classification. I greatly appreciate your work and hope that I can accomplish these two objectives so that I can use your SSAST method for my project. |
Just to follow-up on this bug, it only came up because I tried to run the optional code you commented out at the end of the |
I'm relatively new to Python, so this may be a simple error to debug. However, I'm working through the example in the README to understand what the output of these models is like. My python version is 3.9.18 on macOS Sonoma 14.2.1 with M1 Max chip; I tried to get python 3.7.4, but that is not feasible with the M1 chip -- hopefully, 3.9.18 will suffice and is not the cause of this error.
Below is my MWE:
Here, both calls to
ast_mdl()
result in the following error:The unfolding error only occurs once we define
ast_mdl
as a fine-tuning model.Ultimately, my goal is to plot the probabilities of class assignment for the test input, so if there's a simpler way to do this, I am all ears.
Thank you for your time.
The text was updated successfully, but these errors were encountered: