一般來說這一點(diǎn)不用太擔(dān)心,如果你沒在需要調(diào)用contiguous()的地方調(diào)用contiguous(),運(yùn)行時(shí)會(huì)提示你: RuntimeError: input is not contiguous 只要看到這個(gè)錯(cuò)誤提示,加上contiguous()就好啦~ 補(bǔ)充:pytorch之expand,gather,squeeze,sum,contiguous,softmax,max,argmax g
www.dbjr.com.cn/article/2067...htm 2021-3-3