Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用DAIN进行插帧时出现的device问题 #840

Open
Json0926 opened this issue Mar 15, 2024 · 0 comments
Open

使用DAIN进行插帧时出现的device问题 #840

Json0926 opened this issue Mar 15, 2024 · 0 comments
Assignees

Comments

@Json0926
Copy link

Json0926 commented Mar 15, 2024

在运行predictor.run时
“if order == 'DAIN':
paddle.enable_static()
predictor = DAINPredictor(args.output,
weight_path=args.DAIN_weight,
time_step=args.time_step,
remove_duplicates=args.remove_duplicates)
frames_path, temp_video_path = predictor.run(temp_video_path)
paddle.disable_static()“

得到输出

Model DAIN process start..
[03/15 11:25:47] ppgan INFO: Found /home/aistudio/.cache/ppgan/DAIN_weight.tar
[03/15 11:25:47] ppgan INFO: Decompressing /home/aistudio/.cache/ppgan/DAIN_weight.tar...
Fri Mar 15 11:25:47-WARNING: The old way to load inference model is deprecated. Please specify path_prefix. model path: /home/aistudio/.cache/ppgan/DAIN_weight/model, params path: /home/aistudio/.cache/ppgan/DAIN_weight/params
I0315 11:25:47.703936 3342 interpretercore.cc:237] New Executor is Running.
Old fps (frame rate): 60.0
New fps (frame rate): 120
0%| | 0/359 [00:06<?, ?it/s]
Traceback (most recent call last):
File "tools/video-enhance.py", line 134, in
frames_path, temp_video_path = predictor.run(temp_video_path)
File "/home/aistudio/PaddleGAN/applications/PaddleGAN/PaddleGAN/ppgan/apps/dain_predictor.py", line 161, in run
o = self.base_forward(X)
File "/home/aistudio/PaddleGAN/applications/PaddleGAN/PaddleGAN/ppgan/apps/base_predictor.py", line 61, in base_forward
feed=feed_dict)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/executor.py", line 1401, in run
use_prune=use_prune,
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/executor.py", line 1619, in _run_impl
scope, list(feed.keys()), fetch_list, return_numpy
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/executor.py", line 655, in run
scope, feed_names, fetch_list
NotImplementedError: In user code:

File "/root/miniconda3/lib/python3.7/site-packages/paddle/fluid/framework.py", line 2798, in append_op
attrs=kwargs.get("attrs", None))

File "/root/miniconda3/lib/python3.7/site-packages/paddle/fluid/layer_helper.py", line 43, in append_op
return self.main_program.current_block().append_op(*args, **kwargs)

File "/paddle/work/github/DAIN/DAIN-paddle-release/PWCNet/correlation_op/correlation.py", line 25, in correlation
helper.append_op(type="correlation", inputs={"Input1": input1, "Input2": input2}, attrs={"pad_size": pad_size, "kernel_size": kernel_size, "max_displacement": max_displacement, "stride1": stride1, "stride2": stride2, "corr_type_multiply": corr_type_multiply}, outputs = {"Output": output})

File "/paddle/work/github/DAIN/DAIN-paddle-release/PWCNet/PWCNet.py", line 223, in corr
stride1=1, stride2=1, corr_type_multiply=1)

File "/paddle/work/github/DAIN/DAIN-paddle-release/PWCNet/PWCNet.py", line 277, in forward
corr6 = self.corr(c16, c26)

File "/root/miniconda3/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py", line 600, in __call__
outputs = self.forward(*inputs, **kwargs)

File "/paddle/work/github/DAIN/DAIN-paddle-release/networks/DAIN_slowmotion.py", line 136, in forward_flownets
temp = model(input)

File "/paddle/work/github/DAIN/DAIN-paddle-release/networks/DAIN_slowmotion.py", line 72, in forward
self.forward_flownets(self.flownets, cur_offset_input, time_offsets=time_offsets),

File "/root/miniconda3/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py", line 600, in __call__
outputs = self.forward(*inputs, **kwargs)

File "parse_weights.py", line 25, in convert_model
out = DAIN(image)

File "parse_weights.py", line 179, in <module>
convert_model(pkl_path, model_path)


UnimplementedError: Correlation only supports GPU now.
  [Hint: Expected platform::is_gpu_place(ctx.GetPlace()) == true, but received platform::is_gpu_place(ctx.GetPlace()):0 != true:1.] (at /paddle/paddle/fluid/operators/correlation_op.cc:175)
  [operator < correlation > error]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants