源代码:h[i][j]=h[i][j].view(self.hidden_dim*2,1)
发生异常: RuntimeError:
expand(torch.FloatTensor{[600, 1]}, size=[600]): the number of sizes provided (1) must be greater or equal to the number of dimensions in the tensor (2)
请问大家,我这里哪里出错了?
h[i][j]的shape为[600,1],你view之后的shape为[600,2],整体的数量都变了,6001 != 6002,所以会报错。
楼主解决了吗,我也遇到了这个问题