提交 731ee5a7 编写于 作者: C chenjian

add declaration

上级 2e0d1d8b
......@@ -44,11 +44,11 @@ class Lapstyle_starrynew:
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 starrynew style.
......@@ -58,10 +58,9 @@ class Lapstyle_starrynew:
paths (list[str]): paths to images, eacg element is a dict:
- content (str): path to input image;<br/>
- style (str) : path to style image;<br/>
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()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册