From 48358055d0bb0e9e55592ce1599a5d65332b8d29 Mon Sep 17 00:00:00 2001 From: buchongyu <18001307871@163.com> Date: Thu, 14 Apr 2022 10:28:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9hack=20=E5=8D=95=E8=AF=8D?= =?UTF-8?q?=E6=8B=BC=E5=86=99=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/other/1xt2x/src_deepspeech2x/__init__.py | 8 ++++---- paddlespeech/s2t/__init__.py | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/other/1xt2x/src_deepspeech2x/__init__.py b/examples/other/1xt2x/src_deepspeech2x/__init__.py index 62f3eee3..74be4a25 100644 --- a/examples/other/1xt2x/src_deepspeech2x/__init__.py +++ b/examples/other/1xt2x/src_deepspeech2x/__init__.py @@ -26,10 +26,10 @@ from paddlespeech.s2t.utils.log import Log #TODO(Hui Zhang): remove fluid import logger = Log(__name__).getlog() -########### hcak logging ############# +########### hack logging ############# logger.warn = logger.warning -########### hcak paddle ############# +########### hack paddle ############# paddle.half = 'float16' paddle.float = 'float32' paddle.double = 'float64' @@ -110,7 +110,7 @@ if not hasattr(paddle, 'cat'): paddle.cat = cat -########### hcak paddle.Tensor ############# +########### hack paddle.Tensor ############# def item(x: paddle.Tensor): return x.numpy().item() @@ -353,7 +353,7 @@ if not hasattr(paddle.Tensor, 'tolist'): setattr(paddle.Tensor, 'tolist', tolist) -########### hcak paddle.nn ############# +########### hack paddle.nn ############# class GLU(nn.Layer): """Gated Linear Units (GLU) Layer""" diff --git a/paddlespeech/s2t/__init__.py b/paddlespeech/s2t/__init__.py index 855ceef9..7acc3716 100644 --- a/paddlespeech/s2t/__init__.py +++ b/paddlespeech/s2t/__init__.py @@ -26,10 +26,10 @@ from paddlespeech.s2t.utils.log import Log #TODO(Hui Zhang): remove fluid import logger = Log(__name__).getlog() -########### hcak logging ############# +########### hack logging ############# logger.warn = logger.warning -########### hcak paddle ############# +########### hack paddle ############# paddle.half = 'float16' paddle.float = 'float32' paddle.double = 'float64' @@ -110,7 +110,7 @@ if not hasattr(paddle, 'cat'): paddle.cat = cat -########### hcak paddle.Tensor ############# +########### hack paddle.Tensor ############# def item(x: paddle.Tensor): return x.numpy().item()