paddle1.8.1动态图:
本来想写:index_select(hx[0], permutation, dim=1)
,
结果写成:index_select(hx[0], permutation)
,索引越界不报错。
hx[0]和permutation如下所示:
hx[0].shape = [6, 27, 400]
permutation.shape = [27]
permutation.numpy() =array([16, 22, 5, 0, 26, 11, 23, 2, 10, 15, 3, 6, 1, 9, 21, 20, 18, 19, 8, 14, 13, 7, 12, 24, 25, 17, 4], dtype=int64)
执行上面的代码前三个batch没报错,第4个batch时core掉。
暂无答案!
目前还没有任何答案,快来回答吧!