File "train_end2end.py", line 184, in <module>
main()
File "train_end2end.py", line 181, in main
lr=args.lr, lr_step=args.lr_step)
File "train_end2end.py", line 30, in train_net
sym = eval('get_' + args.network + '_train')(num_classes=config.NUM_CLASSES, num_anchors=config.NUM_ANCHORS)
File "/root/mxnet/example/rcnn/rcnn/symbol/symbol_vgg.py", line 359, in get_vgg_train
rois = mx.symbol.Proposal(
AttributeError: 'module' object has no attribute 'Proposal'
Built from source as of commit 2916b4e7266f596639c415411238d5a01555fcf4 (big rcnn change today).
Here is my Dockerfile:
FROM nvidia/cuda:8.0-cudnn5-devel
# mxnet
#
# note: we build it ourselves instead of using FROM kaixhin/cuda-mxnet:8.0 to control
# the version of mxnet we are building. Bleeding edge master is not always fun.
#
# Install git, wget and other dependencies
RUN apt-get update && apt-get install -y \
git \
libopenblas-dev \
libopencv-dev \
python-dev \
python-numpy \
python-setuptools \
wget
# Clone MXNet repo and move into it
RUN cd /root && git clone --recursive https://github.com/dmlc/mxnet && cd mxnet && \
# use a fixed stable point (key fixes to rcnn on 1/19/2017 https://github.com/dmlc/mxnet/pull/4730)
git checkout 2916b4e7266f596639c415411238d5a01555fcf4 && \
# Copy config.mk
cp make/config.mk config.mk && \
# Set OpenBLAS
sed -i 's/USE_BLAS = atlas/USE_BLAS = openblas/g' config.mk && \
# Set CUDA flag
sed -i 's/USE_CUDA = 0/USE_CUDA = 1/g' config.mk && \
sed -i 's/USE_CUDA_PATH = NONE/USE_CUDA_PATH = \/usr\/local\/cuda/g' config.mk && \
# Set cuDNN flag
sed -i 's/USE_CUDNN = 0/USE_CUDNN = 1/g' config.mk && \
# Make
make -j"$(nproc)"
# Install Python package
RUN cd /root/mxnet/python && python setup.py install
# opencv
#
# Note: we used to build and install opencv3 but that started causing conflicting library issues because
# opencv 2.7 is included via libopencv-dev above. Simply installying the python bindings to the same library
# seems to be sufficient.
RUN apt-get install -y python-opencv
# random other dependencies
RUN apt-get install -y python-scipy \
python-matplotlib \
python-pip
RUN pip install easydict cython scikit-image
# cythonisize!?!?!
RUN cd /root/mxnet/example/rcnn && make && cd -
WORKDIR /root/mxnet/example/rcnn
perhaps @piiswrong or @precedenceguo have insight as this might be related to recently merged https://github.com/dmlc/mxnet/pull/4730
You need to compile the extra operators. It's in the README
thanks @piiswrong, I've been working with RCNN for so many weeks I'd become too accustom to the previous dependencies.
I am getting the same error. how did you fix your problem @krosaen ?
@great-thoughts you can see how we run this here: https://github.com/umautobots/nn-dockerfiles/tree/master/mxnet-rcnn
if you don't want to use docker, the commands in the dockerfile still provides a reproducible build, the key update is:
sed -i 's/EXTRA_OPERATORS =/EXTRA_OPERATORS = example\/rcnn\/operator/g' config.mk && \
@krosaen The error still persists: Below is exactly what I did. I appreciate if you would help.
1 cd mxnet
2 git pull
3 cd example/rcnn
4 ls
5 bash script/additional_deps.sh
6 pip install matplotlib
7 bash script/get_voc.sh
8 bash script/get_pretrained_model.sh
9 bash script/vgg_voc07.sh 0,1
10 ls
11 cd ..
12 sed -i 's/EXTRA_OPERATORS =/EXTRA_OPERATORS = example\/rcnn\/operator/g' config.mk
13 make -j"$(nproc)"
14 cd example
15 cd rcnn
16 make
17 bash script/vgg_voc07.sh 0,1
@piiswrong I followed the readme but still getting an error.
If you really don't know how to do this, just copy everything in example/rcnn/operator into src/operator
@great-thoughts I can't immediately spot the issue, but if you try our docker file, it should work. It's possible there's an issue at the tip of master; our dockerfile builds from v0.9.3 to ensure stability (we'll update it as we test out new releases)
@great-thoughts I am getting the same error, Did you solve this problem?
No, I have not. @zht3344
I spot the same error after I cp ~/mxnet/example/rcnn/operator/* ~/mxnet/src/operator
@great-thoughts do you solve it?
I also have the same error after set EXTRA_OPERATORS = example/rcnn/operator.Please give me some advices.
Hi @piiswrong , I was wondering if you can help solve this issue since many of us are facing a problem.
import mxnet fails.If you still have no attribute Proposal:
ls build/src/operator and check if proposal.o is present.I set the EXTRA_OPERATORS = ~/mxnet/example/rcnn/operator in the file "config.mk" and re-make the mxnet,now it work.
Yes, It is working now for me.
The source code is more recently (v0.9.5) moved to mxnet/src/operator/contrib, and adding to EXTRA_OPERATORS is no longer necessary. However, we should import Proposal by importing from mxnet.contrib.symbol instead of mxnet.symbol package. Hope this helps!~
Most helpful comment
The source code is more recently (v0.9.5) moved to
mxnet/src/operator/contrib, and adding toEXTRA_OPERATORSis no longer necessary. However, we should importProposalby importing frommxnet.contrib.symbolinstead ofmxnet.symbolpackage. Hope this helps!~