diff --git a/ACL_PyTorch/built-in/audio/EspNet_for_Pytoch/acc.diff b/ACL_PyTorch/built-in/audio/EspNet_for_Pytoch/acc.diff index 3164c48fbe71cebf4d1c492813b2e4e7618ed6cc..fc089edda726e1690093b36997f15493a25b949c 100644 --- a/ACL_PyTorch/built-in/audio/EspNet_for_Pytoch/acc.diff +++ b/ACL_PyTorch/built-in/audio/EspNet_for_Pytoch/acc.diff @@ -91,7 +91,7 @@ index 6c6d4ce11..dc150b4a5 100644 from espnet.nets.scorers.length_bonus import LengthBonus from espnet.utils.deterministic_utils import set_deterministic_pytorch from espnet.utils.io_utils import LoadInputsAndTargets -+from acl_infer.acl_net import AclNet ++from pyacl.acl_infer import AclNet +import acl +def _pad_sequence(sequences, batch_first=False, padding_value=0, mul_shape = None): + r"""Pad a list of variable length Tensors with ``padding_value`` diff --git a/ACL_PyTorch/built-in/audio/Wenet_for_Pytorch/no_flash_encoder.sh b/ACL_PyTorch/built-in/audio/Wenet_for_Pytorch/no_flash_encoder.sh index 2b2a9deaa9a16d49184d43944b71d5fcc450d504..5ff3b4723dc2b9d640b8c3627de1ff5ce7661920 100644 --- a/ACL_PyTorch/built-in/audio/Wenet_for_Pytorch/no_flash_encoder.sh +++ b/ACL_PyTorch/built-in/audio/Wenet_for_Pytorch/no_flash_encoder.sh @@ -3,5 +3,5 @@ export PATH=/usr/local/python3.7.5/bin:${install_path}/atc/ccec_compiler/bin:${i export PYTHONPATH=${install_path}/atc/python/site-packages:$PYTHONPATH export LD_LIBRARY_PATH=${install_path}/atc/lib64:$LD_LIBRARY_PATH export ASCEND_OPP_PATH=${install_path}/opp -atc --model=no_flash_encoder_revise.onnx --framework=5 --output=no_flash_encoder_revise --input_format=ND --input_shape_range="xs_input:[1,-1,80];xs_input_lens:[-1]" --log=error --soc_version=Ascend310 +atc --model=no_flash_encoder_revise.onnx --framework=5 --output=no_flash_encoder_revise --input_format=ND --input_shape_range="xs_input:[1,1~1500,80];xs_input_lens:[-1]" --log=error --soc_version=Ascend310 diff --git a/ACL_PyTorch/built-in/audio/Wenet_for_Pytorch/recognize_attenstion_rescoring.py b/ACL_PyTorch/built-in/audio/Wenet_for_Pytorch/recognize_attenstion_rescoring.py index d5a35adbe5c2e228ce9d927f550b0f9464632700..37ce531b198b9d077669ba0ef21c4fc9d29f590e 100644 --- a/ACL_PyTorch/built-in/audio/Wenet_for_Pytorch/recognize_attenstion_rescoring.py +++ b/ACL_PyTorch/built-in/audio/Wenet_for_Pytorch/recognize_attenstion_rescoring.py @@ -155,7 +155,7 @@ if __name__ == '__main__': device_id = 0 ret = acl.rt.set_device(device_id) context, ret = acl.rt.create_context(device_id) - decoder_output_data_shape = 4233000 + decoder_output_data_shape = 42330000 decoder_model = Net(model_path =args.model_path, output_data_shape = decoder_output_data_shape, device_id = device_id, ) json_data = {} with open(args.json_path, 'r') as load_f: