Skip to content

Alignment CRF error #106

Open
Open
@jdegange

Description

@jdegange

Looks like there is an error now on install for AlignmentCRF.

https://github.com/harvardnlp/pytorch-struct/blob/master/notebooks/CTC_with_padding.ipynb

Find marginals (see uncertainty from randomness)
show(dist.marginals, 1)

Error:
`
~/opt/anaconda3/lib/python3.7/site-packages/torch_struct/alignment.py in dp_scan(self, log_potentials, lengths, force_grad)
98 point = (l + M) // 2
99
--> 100 charta[1][:, b, point:, 1, ind, :, :, Mid] = semiring.one
(
101 charta[1][:, b, point:, 1, ind, :, :, Mid]
102 )

AttributeError: type object 'LogSemiring' has no attribute 'one_'
`

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