使用cycle_gan训练出来的模型执行预测命令报错
Created by: yuzhengfei
http://www.paddlepaddle.org/paddle/ModelBase#%E8%AE%A1%E7%AE%97%E6%9C%BA%E8%A7%86%E8%A7%89%0A%E5%9B%BE%E5%83%8F%E7%94%9F%E6%88%90-CycleGAN 训练平台:ubontu18.04,GPU,paddle1.3.0, 预测平台:win10,cpu,paddle1.3.0 报错信息如下: PS C:\Users\yuzhengfei\Desktop\models\models\fluid\PaddleCV\gan\cycle_gan> python infer.py --init_model="./output_0/chec kpoints/1" --input="./data/horse2zebra\inputA*" --input_style A --output="./output" ----------- Configuration Arguments ----------- init_model: ./output_0/checkpoints/1 input: ./data/horse2zebra\inputA* input_style: A output: ./output use_gpu: False
参考官方链接:Traceback (most recent call last): File "infer.py", line 67, in infer(args) File "infer.py", line 40, in infer fluid.io.load_persistables(exe, args.init_model) File "C:\Users\yuzhengfei\AppData\Local\Programs\Python\Python37\lib\site-packages\paddle\fluid\io.py", line 701, in load_persistables filename=filename) File "C:\Users\yuzhengfei\AppData\Local\Programs\Python\Python37\lib\site-packages\paddle\fluid\io.py", line 572, in load_vars filename=filename) File "C:\Users\yuzhengfei\AppData\Local\Programs\Python\Python37\lib\site-packages\paddle\fluid\io.py", line 607, in load_vars executor.run(load_prog) File "C:\Users\yuzhengfei\AppData\Local\Programs\Python\Python37\lib\site-packages\paddle\fluid\executor.py", line 525, in run use_program_cache=use_program_cache) File "C:\Users\yuzhengfei\AppData\Local\Programs\Python\Python37\lib\site-packages\paddle\fluid\executor.py", line 591, in _run exe.run(program.desc, scope, 0, True, True) paddle.fluid.core.EnforceNotMet: Invoke operator load error. Python Callstacks: File "C:\Users\yuzhengfei\AppData\Local\Programs\Python\Python37\lib\site-packages\paddle\fluid\framework.py", line 1317, in append_op attrs=kwargs.get("attrs", None)) File "C:\Users\yuzhengfei\AppData\Local\Programs\Python\Python37\lib\site-packages\paddle\fluid\io.py", line 593, in load_vars attrs={'file_path': os.path.join(dirname, new_var.name)}) File "C:\Users\yuzhengfei\AppData\Local\Programs\Python\Python37\lib\site-packages\paddle\fluid\io.py", line 572, in load_vars filename=filename) File "C:\Users\yuzhengfei\AppData\Local\Programs\Python\Python37\lib\site-packages\paddle\fluid\io.py", line 701, in load_persistables filename=filename) File "infer.py", line 40, in infer fluid.io.load_persistables(exe, args.init_model) File "infer.py", line 67, in infer(args) C++ Callstacks: Cannot open file ./output_0/checkpoints/1\g_A_c1_w for load op at [D:\1.3\paddle\paddle\fluid\operators\load_op.cc:39] PaddlePaddle Call Stacks: Windows not support stack backtrace yet.