如果在view 之前用了transpose, permute 等,需要用contiguous() 来返回一个contiguous copy。 view() 操作后的tensor 和原tensor 共享存储。 pytorch ...
確定! 回上一頁