-
Notifications
You must be signed in to change notification settings - Fork 64
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
can not get the relative error which is less than e-3. #5
Comments
I am not sure why you get these values, I just tried running a fresh copy of this repository on Google Colab and everything worked fine. It could be a problem with the environment. Can you try cloning a fresh repository and then run |
Yeah. That what I did(with only changes to the first code cell) locally. I guess It's environment issue. My configuration: MacBook Pro M1、Python 3.8.12、conda 4.11.0、torch 2.1.0.dev20230415、macOS Monterey Version 12.5 |
Maybe you can try Python 3.10 and PyTorch 2.0? Colab currently uses 3.9.16 and 2.0.0 |
I updated the python and PyTorch to 3.9.16 and 2.0.0 respectively, and pip install -r requirement.txt for me locally.Because it has some errors, so, I changed some version numbers and installed it successfully.
|
I see, I will try running this in my local environment and I'll let you know. A temporary workaround for now would be to run it on Colab |
Because of some policy reasons, Colab is not convenient for me~ |
I tried in my local environment and still everything seems fine. Can you reproduce the following:
|
I have finished all steps of yours(only Jupyter was installed extra), and I have python 3.9.16 and PyTorch 2.0.
in my first computable cell. |
Hmm, do you only get that in |
Yeah, I have tried other solutions. And only Transformer_Captioning.ipynb has this error in assignment3. |
If even other solutions don't work, it's most likely a problem with the environment. I would suggest trying the following:
|
Thanks, I will try. |
|
Had the same problem with my solution, and using this repo's solution also gave me the exact same error. Also using M1. I don't think it's a coincidence. |
Also having such problem with Mac M1 silicon. The reason is due to the incompleteness of PyTorch reproducibility across different platforms (see details at the below link).
By step by step debugging, one potential reason is the |
I am learning the Transformer_Captioning.ipynb in assignment3. After I run the cell of testing MultiHeadAttention, I get some incorrect results:
I even copied your MultiHeadAttention code. But, I still get the same result:
I even downloaded your assignment3 code, and I still get the same output.
Is there anything else I missed?
The text was updated successfully, but these errors were encountered: