Giter Site home page Giter Site logo

Comments (12)

longcw avatar longcw commented on June 27, 2024 1

我这里连续跑VOC07的测试集是每帧 0.12s 左右,cpu的RoIPool 只比gpu 慢一点。
see this:smallcorgi/Faster-RCNN_TF#19

I got the same error (i.e., cudaCheckError() failed : invalid device function) with my Tesla K40. When I changed the -arch parameter in lib/make.sh to sm_35, and rerun make.sh, it worked.

你可以试试按照他说的在faster_rcnn/make.sh 里面改 -arch=sm_35
不同GPU的计算能力: https://developer.nvidia.com/cuda-gpus

from faster_rcnn_pytorch.

lancejchen avatar lancejchen commented on June 27, 2024 1

对于其它GPU:

# Which CUDA capabilities do we want to pre-build for?
# https://developer.nvidia.com/cuda-gpus
#   Compute/shader model   Cards
#   6.1		      P4, P40, Titan X so CUDA_MODEL = 61
#   6.0                    P100 so CUDA_MODEL = 60
#   5.2                    M40
#   3.7                    K80
#   3.5                    K40, K20
#   3.0                    K10, Grid K520 (AWS G2)
#   Other Nvidia shader models should work, but they will require extra startup
#   time as the code is pre-optimized for them.
CUDA_MODELS=30 35 37 52 60 61

Credit to https://github.com/mldbai/mldb/blob/master/ext/tensorflow.mk

from faster_rcnn_pytorch.

longcw avatar longcw commented on June 27, 2024

Is there any other error message like the line number for me to find the reason.

from faster_rcnn_pytorch.

iFighting avatar iFighting commented on June 27, 2024

你是**人,我说中文吧,就这两行输出。。我跑其他的模型的时候没有出错的

from faster_rcnn_pytorch.

longcw avatar longcw commented on June 27, 2024

可能是RoIPool 的问题吧,你试试用python实现的RoIPool 能不能跑,在faster_rcnn/faster_rcnn.py:

from roi_pooling.modules.roi_pool_py import RoIPool
# from roi_pooling.modules.roi_pool import RoIPool

from faster_rcnn_pytorch.

iFighting avatar iFighting commented on June 27, 2024

果然是这个原因。。搞好了,不过速度非常慢啊。。一张图片4秒钟
我还没仔细看代码,是什么原因导致错误呢?
最后。。
你是T大的,厉害,是不是最近也在学pytorch啊,方便加个联系方式一起交流嘛

from faster_rcnn_pytorch.

longcw avatar longcw commented on June 27, 2024

是的,python实现的RoIPool需要2,3秒。
但是你那GPU实现的不能跑我也不知道原因了,你试试重新编译,你的GPU型号是什么,我这里GTX1080是没有问题的。
或者强制用CPU版的(只实现了前传),在faster_rcnn/roi_pooling/functions/roi_pool.py:

if not features.is_cuda:
    _features = features.permute(0, 2, 3, 1)
    roi_pooling.roi_pooling_forward(self.pooled_height, self.pooled_width, self.spatial_scale,
                                    _features, rois, output)
    # output = output.cuda()

改成:

if True:
    is_cuda = features.is_cuda

    _features = features.permute(0, 2, 3, 1)
    if is_cuda:
        _features = _features.cpu()
        rois = rois.cpu()

    roi_pooling.roi_pooling_forward(self.pooled_height, self.pooled_width, self.spatial_scale,
                                    _features, rois, output)
    if is_cuda:
        output = output.cuda()

from faster_rcnn_pytorch.

iFighting avatar iFighting commented on June 27, 2024

GPU是Tesla K40m,cuda是7.5
用CPU前传。。。速度也很慢啊,囧
我重新编译过了还是这个问题

from faster_rcnn_pytorch.

longcw avatar longcw commented on June 27, 2024

我也是刚开始用pytorch,一起交流哈~
我的邮箱[email protected],微信qq啥的可以邮箱发给你。

from faster_rcnn_pytorch.

iFighting avatar iFighting commented on June 27, 2024

好的

from faster_rcnn_pytorch.

nlqq avatar nlqq commented on June 27, 2024

hi,可以带我一个吗,pytorch新手,跑过mxnet,tf等

from faster_rcnn_pytorch.

nlqq avatar nlqq commented on June 27, 2024

[email protected]

from faster_rcnn_pytorch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.