运行DeepASR训练报错
Created by: jeff41404
使用文档中介绍的例子训练,执行sh train.sh ,一段时间后报错 Traceback (most recent call last): File "../../train.py", line 292, in train(args) File "../../train.py", line 254, in train (batch_id, lodtensor_to_ndarray(outs[0])[0], File "/source/models/fluid/DeepASR/data_utils/util.py", line 34, in lodtensor_to_ndarray ret.ravel()[i] = lod_tensor.get_float_element(i) AttributeError: 'paddle.fluid.core.LoDTensor' object has no attribute 'get_float_element'
使用的Paddle版本为 v0.15.0 将/source/models/fluid/DeepASR/data_utils/util.py 第34行改为 ret.ravel()[i] = np.array(lod_tensor)[i] 可以运行