Skip to content
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

怎么使用多卡训练 #311

Open
TinkingLoeng opened this issue Jun 29, 2022 · 2 comments
Open

怎么使用多卡训练 #311

TinkingLoeng opened this issue Jun 29, 2022 · 2 comments

Comments

@TinkingLoeng
Copy link

No description provided.

@sunjunlishi
Copy link

hi,这个耗时呀。使用双卡可以提升一倍的速度呀。怎么用呀,loss的时候 那个问题没法解决。怎么解决呀

@sunjunlishi
Copy link

简单的尝试解决,更改维度:
preds = model(inp).cpu()

    ps = preds.size()
    
    new_shape = ((int)(ps[0]/2), ps[1]*2, ps[2])
    preds = preds.view(*new_shape)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants