pytorch-PCN icon indicating copy to clipboard operation
pytorch-PCN copied to clipboard

a question about GPU running

Open wuyue112 opened this issue 3 years ago • 0 comments

Hello. I tested it on the GPU, and it slowed down a lot. After debugging, I found that pcn.py→def stage1(),These two double "for" take a lot of time. for i in range(cls_prob.shape[2]): # cls_prob[2]->height for j in range(cls_prob.shape[3]): # cls_prob[3]->width I've put net_input into the GPU, corresponding, CLS_ Prob, rotate and bbox are also loaded into the GPU.these two “for” need changed??? Or I use GPU in the wrong way. Can you help me

您好,我尝试了用gpu运行,速度变慢了。经过调试,我发现是pcn.py→def stage1()函数中的这个双for循环 占用了大量的时间,比在cpu上还要更久。 for i in range(cls_prob.shape[2]): # cls_prob[2]->height for j in range(cls_prob.shape[3]): # cls_prob[3]->width 我把模型加载到了gpu,把net_input也加载到了gpu ,相应的CLS_ Prob, rotate and bbox都在gpu,这两句for有需要改的么。 还是说我使用gpu的方式不对呢?你可以帮帮我么

wuyue112 avatar Dec 22 '20 08:12 wuyue112