From 8de566467d866c9ffcaf7d386e082a493b2d0444 Mon Sep 17 00:00:00 2001 From: chenjian Date: Mon, 14 Mar 2022 10:32:37 +0800 Subject: [PATCH] add declaration --- .../style_transfer/lapstyle_ocean/module.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/image/Image_gan/style_transfer/lapstyle_ocean/module.py b/modules/image/Image_gan/style_transfer/lapstyle_ocean/module.py index 8125b9ec..ea82448c 100644 --- a/modules/image/Image_gan/style_transfer/lapstyle_ocean/module.py +++ b/modules/image/Image_gan/style_transfer/lapstyle_ocean/module.py @@ -44,11 +44,11 @@ class Lapstyle_ocean: self.network = LapStylePredictor(weight_path=self.pretrained_model) def style_transfer(self, - images=None, - paths=None, - output_dir='./transfer_result/', - use_gpu=False, - visualization=True): + images: list = None, + paths: list = None, + output_dir: str = './transfer_result/', + use_gpu: bool = False, + visualization: bool = True): ''' Transfer a image to ocean style. @@ -59,9 +59,9 @@ class Lapstyle_ocean: - content (str): path to input image;
- style (str) : path to style image;
- output_dir: the dir to save the results - use_gpu: if True, use gpu to perform the computation, otherwise cpu. - visualization: if True, save results in output_dir. + output_dir (str): the dir to save the results + use_gpu (bool): if True, use gpu to perform the computation, otherwise cpu. + visualization (bool): if True, save results in output_dir. ''' results = [] paddle.disable_static() -- GitLab