whai362 / PSENet

Official Pytorch implementations of PSENet.
Apache License 2.0
1.17k stars 345 forks source link

这里结果不对吧? kernels大于0判断,为啥去大于0的,这里的kernels阈值怎么会是0呢 #185

Open cqray1990 opened 2 years ago

cqray1990 commented 2 years ago

score = torch.sigmoid(out[:, 0, :, :])

out = (torch.sign(out - 1) + 1) / 2 # 0 1

    #
    # text_mask = out[:, 0, :, :]
    # kernels = out[:, 1:cfg.test_cfg.kernel_num, :, :] * text_mask

    kernels = out[:, :cfg.test_cfg.kernel_num, :, :] > 0
    text_mask = kernels[:, :1, :, :]
    kernels[:, 1:, :, :] = kernels[:, 1:, :, :] * text_mask
zeng-cy commented 1 year ago

No module named 'models.post_processing.pa.pa',这个问题您遇到过吗?