How to use DataParallel in Pytorch while using parts of model?

I’m unsure what exactly you’re trying to do, are you trying to run different parts of your model on different GPU? If so, @ailzhang’s answer here might be relevant.

If not, can you describe what you’re trying to do in more detail?