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
A issue about multi-gpu #235
Labels
Comments
Multi gpu is "under construction" until pytorch improves. We'll add an
assert for now. (PR welcome).
On Sep 6, 2017 7:48 PM, "Roger" <notifications@github.com> wrote:
Hello, all.
I was encountering a error when I ran openmt with multi-gpu option
python train.py -data data/demo -save_model demo-model -word_vec_size 620
-gpuid 0 1 2 3
Traceback (most recent call last):
File "train.py", line 309, in
main()
File "train.py", line 270, in main
model.encoder.embeddings.load_pretrained_vectors(opt.pre_word_vecs_enc)
File "/home1/yaojie/anaconda2/lib/python2.7/site-packages/torch/nn/modules/module.py",
line 262, in *getattr*
type(self).*name*, name))
AttributeError: 'DataParallel' object has no attribute 'encoder'
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_OpenNMT_OpenNMT-2Dpy_issues_235&d=DwMCaQ&c=WO-RGvefibhHBZq3fL85hQ&r=wnHFZ7D4m-9MRwk-CWlvCGbWEiQX_AvUO2LuMy4Vj7c&m=R6NcKlTYIR2kUt912dRiQLEddSBhmZ9QkgJtzM88g0U&s=VL6Q3WtzGe8jIdk8Myw6d1mOxLscyL4R_KzNnMbmXyg&e=>,
or mute the thread
<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AACMKp1JGg9BhoEg6r0D0jaZHF1UKVLeks5sfy9DgaJpZM4PPHD5&d=DwMCaQ&c=WO-RGvefibhHBZq3fL85hQ&r=wnHFZ7D4m-9MRwk-CWlvCGbWEiQX_AvUO2LuMy4Vj7c&m=R6NcKlTYIR2kUt912dRiQLEddSBhmZ9QkgJtzM88g0U&s=OBXXD7ffs_i4zmqYHm7ii0YXmDz96mNT3uoW9xlOHHQ&e=>
.
|
Your problem can be simply fixed by moving this line Actually there are totally two main problems concerning multi-gpus:
|
@dalegebit we would love a PR if you have one. |
Sure |
marcotcr
pushed a commit
to marcotcr/OpenNMT-py
that referenced
this issue
Sep 20, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, all.
I was encountering a error when I ran openmt with multi-gpu option
python train.py -data data/demo -save_model demo-model -word_vec_size 620 -gpuid 0 1 2 3
Traceback (most recent call last):
File "train.py", line 309, in
main()
File "train.py", line 270, in main
model.encoder.embeddings.load_pretrained_vectors(opt.pre_word_vecs_enc)
File "/home1/yaojie/anaconda2/lib/python2.7/site-packages/torch/nn/modules/module.py", line 262, in getattr
type(self).name, name))
AttributeError: 'DataParallel' object has no attribute 'encoder'
The text was updated successfully, but these errors were encountered: