CRNN_Chinese_Characters_Rec icon indicating copy to clipboard operation
CRNN_Chinese_Characters_Rec copied to clipboard

怎么使用多卡训练

Open TinkingLoeng opened this issue 2 years ago • 2 comments

TinkingLoeng avatar Jun 29 '22 07:06 TinkingLoeng

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

sunjunlishi avatar Feb 05 '24 03:02 sunjunlishi

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

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

sunjunlishi avatar Feb 21 '24 09:02 sunjunlishi