Haowen Qiu

Results 31 comments of Haowen Qiu

> fsa = k2.linear_fsa([[2],[2],[2]]) you are printing an FsaVec instead of an Fsa. seems we now don't support print FsaVec in python. you can do `print(fsa[0])` to print each fsa.

Supported FsaVec printing in this pr https://github.com/k2-fsa/k2/pull/355

> It looks like _GetTotScoresFunction.forward() and backward() are called twice on the 1st minibatch I think this is correct as you call forward and backward both on `num_graph` and `den_graph`,...

Also, I think you can remove `den_graph` to see if it crashes or not, if it does not crash, it may be something wrong when we do forward/backward on a...

Can you show me those tensors' sizes when just using `den_grpah` (including den_graph's shape info), it seems to me that `den_graph` changes across iterations? > [F] /home/ywang/fairseq4/espresso/tools/k2/k2/csrc/fsa_utils.cu:GetArcScores:1463 Check failed: num_states...

Not sure if I understand your problems correctly, but `k2.invert` will remove those epsilon labels when output them as `dest.aux_labels`, as here you invert two times (in the first version),...

Noted as well that `L.invert()` is just swapping the labels and aux_labels (as they are both tensor), so it did not remove anything.

Oh, I see. So in the first version ``` if hasattr(L, "aux_labels"): L.temp_labels = L.aux_labels del L.aux_labels HL = k2.invert(k2.connect(k2.intersect(L, H_inv))) if hasattr(HL, "temp_labels"): HL.aux_labels = HL.temp_labels del HL.temp_labels HL_inv...

As your L here is a very simple format ``` FREETEXT freetext HiXiaowen hixiaowen NihaoWenwen nihaowenwen SIL ``` I think maybe there is an easier way to do this is:...