diff --git a/examples/other/1xt2x/src_deepspeech2x/__init__.py b/examples/other/1xt2x/src_deepspeech2x/__init__.py index 62f3eee3e..74be4a254 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 855ceef96..7acc37160 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()