Open SiminLi opened 3 years ago
Sorry, and there's another problem. I successfully build encoding in a conda environment and successfully import encoding at the terminal. However, after I use linux's screen or tmux, and activate the conda environment again, python reports "cannot import name 'cpu' from encoding". How can that happen?
I met the same problem
Please use it together with DataParallelCriterion https://hangzhang.org/PyTorch-Encoding/parallel.html#dataparallelcriterion
Dear HangZhang, Thanks for your code! I was working on a multi-GPU version of my code, which is like:
model = CDCK2(xxx) model = encoding.parallel.DataParallelModel(model).cuda()
The model is something like h, z=model(x).
While running the model using encoding.parallel.DataParallelModel, it gives me an error of "too many values to unpack". I believe the error must be that the model returns multiple output from different GPUs. I'm not very familiar of data parallelism. Could you please share some hints on how to fix this?