From 80aeac6edc7ea1bc0bb0c2303e561931696e749b Mon Sep 17 00:00:00 2001 From: 嘉渊 <wangjiaming.wjm@alibaba-inc.com> Date: 星期一, 24 四月 2023 14:56:46 +0800 Subject: [PATCH] update --- egs/aishell/paraformer/run.sh | 4 ++-- funasr/layers/abs_normalize.py | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/egs/aishell/paraformer/run.sh b/egs/aishell/paraformer/run.sh index 9d76a5b..60078a0 100755 --- a/egs/aishell/paraformer/run.sh +++ b/egs/aishell/paraformer/run.sh @@ -3,8 +3,8 @@ . ./path.sh || exit 1; # machines configuration -CUDA_VISIBLE_DEVICES="0,1" -gpu_num=2 +CUDA_VISIBLE_DEVICES="0" +gpu_num=1 count=1 gpu_inference=true # Whether to perform gpu decoding, set false for cpu decoding # for gpu decoding, inference_nj=ngpu*njob; for cpu decoding, inference_nj=njob diff --git a/funasr/layers/abs_normalize.py b/funasr/layers/abs_normalize.py new file mode 100644 index 0000000..4e617d0 --- /dev/null +++ b/funasr/layers/abs_normalize.py @@ -0,0 +1,14 @@ +from abc import ABC +from abc import abstractmethod +from typing import Tuple + +import torch + + +class AbsNormalize(torch.nn.Module, ABC): + @abstractmethod + def forward( + self, input: torch.Tensor, input_lengths: torch.Tensor = None + ) -> Tuple[torch.Tensor, torch.Tensor]: + # return output, output_lengths + raise NotImplementedError \ No newline at end of file -- Gitblit v1.9.1