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

python3 eval.py Error:NotImplementedError #40

Closed
pomelo93 opened this issue Dec 9, 2019 · 4 comments
Closed

python3 eval.py Error:NotImplementedError #40

pomelo93 opened this issue Dec 9, 2019 · 4 comments

Comments

@pomelo93
Copy link

pomelo93 commented Dec 9, 2019

When I run python3 eval.py, raise NotImplementedError. why? how to slove it?

@MhLiao
Copy link
Owner

MhLiao commented Dec 9, 2019

@pomelo93 Have you followed the Readme document?

@MhLiao
Copy link
Owner

MhLiao commented Dec 9, 2019

@pomelo93 You should not use python3 eval.py without passing a config file. Please see the specific parameters of this command

@pomelo93
Copy link
Author

pomelo93 commented Dec 9, 2019

@MhLiao Sorry, I simplify my description. I ran python3 eval.py experiments/seg_detector/totaltext_resnet18_deform_thre.yaml --resume models/totaltext_resnet18 --polygon --box_thresh 0.6. And it told me NotImplementedError. Here is the releated error information.Thanks!
./datasets/total_text/ [INFO] [2019-12-09 14:32:07,396] Resuming from models/totaltext_resnet18 [INFO] [2019-12-09 14:32:07,429] Resumed from models/totaltext_resnet18 0%| | 0/300 [00:00<?, ?it/s] Traceback (most recent call last): File "eval.py", line 193, in <module> main() File "eval.py", line 79, in main Eval(experiment, experiment_args, cmd=args, verbose=args['verbose']).eval(args['visualize']) File "eval.py", line 176, in eval pred = model.forward(batch, training=False) File "/media/zdyd/data/swf/Github/DB/structure/model.py", line 56, in forward pred = self.model(data, training=self.training) File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 547, in __call__ result = self.forward(*input, **kwargs) File "/usr/local/lib/python3.6/dist-packages/torch/nn/parallel/data_parallel.py", line 140, in forward return self.module(*inputs, **kwargs) File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 547, in __call__ result = self.forward(*input, **kwargs) File "/media/zdyd/data/swf/Github/DB/structure/model.py", line 19, in forward return self.decoder(self.backbone(data), *args, **kwargs) File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 547, in __call__ result = self.forward(*input, **kwargs) File "/media/zdyd/data/swf/Github/DB/backbones/resnet.py", line 240, in forward x3 = self.layer2(x2) File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 547, in __call__ result = self.forward(*input, **kwargs) File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/container.py", line 92, in forward input = module(input) File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 547, in __call__ result = self.forward(*input, **kwargs) File "/media/zdyd/data/swf/Github/DB/backbones/resnet.py", line 88, in forward out = self.conv2(out, offset, mask) File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 547, in __call__ result = self.forward(*input, **kwargs) File "/media/zdyd/data/swf/Github/DB/assets/ops/dcn/modules/deform_conv.py", line 128, in forward self.groups, self.deformable_groups) File "/media/zdyd/data/swf/Github/DB/assets/ops/dcn/functions/deform_conv.py", line 131, in forward raise NotImplementedError NotImplementedError

@MhLiao
Copy link
Owner

MhLiao commented Dec 9, 2019

@pomelo93 As indicated in DB/assets/ops/dcn/functions/deform_conv.py", line 131, the DCN is not implemented with the CPU mode. Thus, you must use GPU to run the model currently. Otherwise, you should remove the DCN in the model.

@MhLiao MhLiao closed this as completed Dec 10, 2019
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