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

How to do the inference of the pre-training stage (given some test distorted images, output the DDMs)? #1

Open
TK-KXS opened this issue Jul 24, 2024 · 1 comment

Comments

@TK-KXS
Copy link

TK-KXS commented Jul 24, 2024

In pre_training/inference_docmae.py, there is an error at...

 34         x = x.permute(0,3,1,2)
 35         ddm = np.empty((256,256,1))
 --> 36         loss, y, mask = self.docmae(x)
 37 
 38         return x, loss, y, mask
 /usr/local/lib64/python3.7/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
 1188         if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
 1189                 or _global_forward_hooks or _global_forward_pre_hooks):
 ---> 1190             return forward_call(*input, **kwargs)
 1191         # Do not call functions when jit is used
 1192         full_backward_hooks, non_full_backward_hooks = [], []

 TypeError: forward() missing 1 required positional argument: 'ddm'

How to solve this?

@TK-KXS TK-KXS changed the title How to infer the ddm (given some test distorted images, output the DDM)? How to do the inference of the pre-training stage (given some test distorted images, output the DDMs)? Jul 24, 2024
@lzk9508
Copy link
Owner

lzk9508 commented Dec 17, 2024

sorry for long time no response to your issue. please try to run the test.py to get the ddm of an input picture with pre-trained model. inference_docmae.py is dicarded.

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