Batch_Parallel_LatticeLSTM icon indicating copy to clipboard operation
Batch_Parallel_LatticeLSTM copied to clipboard

请教一个代码的问题

Open mahatmaWM opened this issue 4 years ago • 2 comments

            if not self.skip_before_head:
                c_x = c_[[index_0, index_1 + 1]]
                h_x = h_[[index_0, index_1 + 1]]
            else:
                c_x = c_[[index_0, index_1]]
                h_x = h_[[index_0, index_1]]

请教一下作者,https://github.com/LeeSureman/Batch_Parallel_LatticeLSTM/blob/master/modules.py 里面的420那几行,是什么意思?[里面也是二维tensor] 看官方doc没有看到这样获取元素的例子,麻烦作者告知,或者有例子链接推荐一下,谢谢!

mahatmaWM avatar Sep 30 '20 06:09 mahatmaWM

https://blog.csdn.net/SHU15121856/article/details/87810372 可以看下这个

LeeSureman avatar Sep 30 '20 06:09 LeeSureman

            if not self.skip_before_head:
                c_x = c_[[index_0, index_1 + 1]]
                h_x = h_[[index_0, index_1 + 1]]
            else:
                c_x = c_[[index_0, index_1]]
                h_x = h_[[index_0, index_1]]

请教一下作者,https://github.com/LeeSureman/Batch_Parallel_LatticeLSTM/blob/master/modules.py 里面的420那几行,是什么意思?[里面也是二维tensor] 看官方doc没有看到这样获取元素的例子,麻烦作者告知,或者有例子链接推荐一下,谢谢! 你好,请问你理解了吗?能分享下吗?谢谢

Feng-hue avatar Apr 09 '22 14:04 Feng-hue