Closed brianlan closed 7 years ago
@brianlan hi, sorry to see it now. Have you tried to apply this code into main program?
@zzw922cn Yes, I've tried it on the main program and works fine. Take timit_train.py as example, we can simply import it
from utils.PER_merge_phn import SparseTensor, calc_PER
and then change
er = get_edit_distance([pre.values], [y.values], True, level)
to
er = calc_PER(SparseTensor(pre.indices, pre.values, pre.dense_shape),
SparseTensor(y.indices, y.values, y.dense_shape))
Sample usage: