Open unblock7 opened 1 year ago
myrun.py
from ppgan.apps import RealSRPredictor
sr = RealSRPredictor()
sr.run_image("docs/imgs/1.png")
Error:
PS C:\p\python\PaddleGAN\PaddleGAN> python myrun.py
[05/16 00:54:27] ppgan INFO: Found C:\Users\Admin\.cache\ppgan\DF2K_JPEG.pdparams
Traceback (most recent call last):
File "C:\p\python\PaddleGAN\PaddleGAN\myrun.py", line 3, in <module>
sr.run_image("docs/imgs/1.png")
File "C:\p\python\PaddleGAN\PaddleGAN\ppgan\apps\realsr_predictor.py", line 64, in run_image
out = self.model(x)
File "C:\p\python\RealSR-PyTorch\RealSR-PyTorch\myenvname\lib\site-packages\paddle\fluid\dygraph\layers.py", line 948, in __call__
return self.forward(*inputs, **kwargs)
File "C:\p\python\PaddleGAN\PaddleGAN\ppgan\models\generators\rrdb_net.py", line 120, in forward
fea = self.conv_first(fea)
File "C:\p\python\RealSR-PyTorch\RealSR-PyTorch\myenvname\lib\site-packages\paddle\fluid\dygraph\layers.py", line 948, in __call__
return self.forward(*inputs, **kwargs)
File "C:\p\python\RealSR-PyTorch\RealSR-PyTorch\myenvname\lib\site-packages\paddle\nn\layer\conv.py", line 712, in forward
out = F.conv._conv_nd(
File "C:\p\python\RealSR-PyTorch\RealSR-PyTorch\myenvname\lib\site-packages\paddle\nn\functional\conv.py", line 140, in _conv_nd
pre_bias = _C_ops.conv2d(
OSError: Invalid enum backend type `64`.
[D:\paddle\paddle/phi/common/backend.h:140]
问题确认 Search before asking
请提出你的问题 Please ask your question
Environment
Paddlepaddle version: 2.4.1 (Compiled noavx *.whl) OS Platform: Windows x64 Hardware: CPU noavx Program Language: Python
Problem
When i run:
python tools/predict.py --config configs/ppmattingv2/ppmattingv2-stdc1-human_512.yml --model_path pretrained_models/ppmattingv2-stdc1-human_512.pdparams --image_path demo/human.jpg --save_dir output/results
I get this error:log.txt