Open Summer-1994 opened 4 years ago
@Summer-1994 text_raw_indices, aspect_indices 分别是原文本和aspect文本映射到词表id的序列 https://github.com/songyouwei/ABSA-PyTorch/blob/06ed21091dee8e85317ee0e6d665be49236a688d/data_utils.py#L137
!=0是因为词表id从1开始编号,而序列在做padding的时候填充的都是0 https://github.com/songyouwei/ABSA-PyTorch/blob/06ed21091dee8e85317ee0e6d665be49236a688d/data_utils.py#L86 https://github.com/songyouwei/ABSA-PyTorch/blob/06ed21091dee8e85317ee0e6d665be49236a688d/data_utils.py#L66
太感谢您啦~
为什们求sum要有 text_raw_indices !=0 aspect_indices !=0 呢?