Skip to content

SW_cuda modual #155

@Zhu-Siqi

Description

@Zhu-Siqi

Hi,

I want to do some end-to-end training using your sw_cuda modual. But it seems that I don't how it works. My code:

from deepblast.sw_cuda import SmithWatermanDecoder
device = torch.device('cuda:0')

ddp = SmithWatermanDecoder(operator='softmax')
match = torch.randn(100, 120, 108).requires_grad_(True)
gap = torch.randn(100, 120, 108).requires_grad_(True)
aln = ddp.decode(match.to(device), gap.to(device))

In my understanding, aln should return the probability of alignment. However, the aln tensor always get 0 in the first row and column, which means aln don't return what I want. So is my code wrong, or I just misunderstand the output of ddp.decode?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions