hpi-xnor / BMXNet

(New version is out: https://github.com/hpi-xnor/BMXNet-v2) BMXNet: An Open-Source Binary Neural Network Implementation Based on MXNet
Apache License 2.0
350 stars 95 forks source link

Problems: Q series API function with faster rcnn in mxnet/examples/rcnn #27

Closed jacky4323 closed 5 years ago

jacky4323 commented 6 years ago

Hi guys,

I already can use Q series API function to train and test on mnist dataset Now I wants to test the pretrained model from smd_hpi/examples/binary-imagenet1k with faster rcnn code which in mxnet/examples/rcnn.So I setup the environment for rcnn requirements using the script file in mxnet/examples/rcnn/script/additional_deps.sh,and this file has list below,and I can run faster rcnn properly. However I can't run my original Q series API function well,and get the error below: AttributeError: 'module' object has no attribute 'QActivation'

Sorry,I'm not familiar with Linux so I don't know how to solve this problems thanks a lot.

Best Regards, Peng

error message: [13:35:09] /home/jacky4323/BMXNet_New/mxnet/src/operator/././cudnn_algoreg-inl.h:107: Running performance tests to find the best convolution algorithm, this can take a while... (setting env variable MXNET_CUDNN_AUTOTUNE_DEFAULT to 0 to disable) [13:35:29] /home/jacky4323/BMXNet_New/mxnet/dmlc-core/include/dmlc/logging.h:308: [13:35:29] /home/jacky4323/BMXNet_New/mxnet/src/operator/contrib/proposal.cu:495: Check failed: error == cudaSuccess (7 vs. 0) too many resources requested for launch

Stack trace returned 10 entries: [bt] (0) /home/jacky4323/BMXNet_New/mxnet/build/libmxnet.so(_ZN4dmlc15LogMessageFatalD1Ev+0x3c) [0x7f49e2020e9c] [bt] (1) /home/jacky4323/BMXNet_New/mxnet/build/libmxnet.so(_ZN5mxnet2op13ProposalGPUOpIN7mshadow3gpuEE7ForwardERKNS_9OpContextERKSt6vectorINS_5TBlobESaIS9_EERKS8_INS_9OpReqTypeESaISE_EESDSD+0x12b9) [0x7f49e4e1f2c9] [bt] (2) /home/jacky4323/BMXNet_New/mxnet/build/libmxnet.so(_ZN5mxnet2op13OperatorState7ForwardERKNS_9OpContextERKSt6vectorINS_5TBlobESaIS6_EERKS5_INS_9OpReqTypeESaISBEESA+0x36d) [0x7f49e228c4ed] [bt] (3) /home/jacky4323/BMXNet_New/mxnet/build/libmxnet.so(_ZN5mxnet4exec23StatefulComputeExecutor3RunENS_10RunContextEb+0x69) [0x7f49e2193e69] [bt] (4) /home/jacky4323/BMXNet_New/mxnet/build/libmxnet.so(+0x992210) [0x7f49e2158210] [bt] (5) /home/jacky4323/BMXNet_New/mxnet/build/libmxnet.so(_ZN5mxnet6engine14ThreadedEngine15ExecuteOprBlockENS_10RunContextEPNS0_8OprBlockE+0x93) [0x7f49e204fa83] [bt] (6) /home/jacky4323/BMXNet_New/mxnet/build/libmxnet.so(_ZN5mxnet6engine23ThreadedEnginePerDevice9GPUWorkerILN4dmlc19ConcurrentQueueTypeE0EEEvNS_7ContextEbPNS1_17ThreadWorkerBlockIXT_EEESt10shared_ptrINS0_10ThreadPool11SimpleEventEE+0x10b) [0x7f49e205889b] [bt] (7) /home/jacky4323/BMXNet_New/mxnet/build/libmxnet.so(_ZNSt17_Function_handlerIFvSt10shared_ptrIN5mxnet6engine10ThreadPool11SimpleEventEEEZZNS2_23ThreadedEnginePerDevice13PushToExecuteEPNS2_8OprBlockEbENKUlvE1_clEvEUlS5_E_E9_M_invokeERKSt9_AnydataOS5+0x63) [0x7f49e2058ac3] [bt] (8) /home/jacky4323/BMXNet_New/mxnet/build/libmxnet.so(_ZNSt6thread5_ImplISt12_Bind_simpleIFSt8functionIFvSt10shared_ptrIN5mxnet6engine10ThreadPool11SimpleEventEEEES8_EEE6_M_runEv+0x4a) [0x7f49e205222a] [bt] (9) /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb8c80) [0x7f4a60b89c80]

[13:35:29] /home/jacky4323/BMXNet_New/mxnet/dmlc-core/include/dmlc/logging.h:308: [13:35:29] /home/jacky4323/BMXNet_New/mxnet/src/engine/./threaded_engine.h:359: [13:35:29] /home/jacky4323/BMXNet_New/mxnet/src/operator/contrib/proposal.cu:495: Check failed: error == cudaSuccess (7 vs. 0) too many resources requested for launch

additional_deps.sh file content has shown below:

!/usr/bin/env bash

install additional depts

sudo apt install python-pip python-dev unzip python-matplotlib sudo pip install cython scikit-image easydict

install a forked MXNet

pushd ../../ cp make/config.mk ./ echo "USE_CUDA=1" >>config.mk echo "USE_CUDA_PATH=/usr/local/cuda" >>config.mk echo "USE_CUDNN=1" >>config.mk make -j$(nproc) pushd python python setup.py install --user popd popd

build cython extension

make

yanghaojin commented 5 years ago

please check our new version BMXNet v2: https://github.com/hpi-xnor/BMXNet-v2