facebookresearch / multipathnet

A Torch implementation of the object detection network from "A MultiPath Network for Object Detection" (https://arxiv.org/abs/1604.02135)
Other
1.34k stars 275 forks source link

Index error when preparing models for training. #31

Closed outgrabe closed 7 years ago

outgrabe commented 8 years ago

I wanted to test training MultiPathNet (would like to train with my own classes), so I used:

train_nGPU=1 test_nGPU=1 ./scripts/train_multipathnet_coco.sh

similar to as described on the project main page. When running I get an error on the preparation stage in multipathnet.lua, when removing layers(?) from the imagenet pretrained model.

This line: for i,v in ipairs{11,10,9,8,1} do classifier:remove(v) end

fails with an index out of range error:

..more_directories../torch/install/share/lua/5.1/nn/Sequential.lua:29: index out of range
stack traceback:
    [C]: in function 'error'
    .../alexander/torch/install/share/lua/5.1/nn/Sequential.lua:29: in function 'remove'
    /home/alexander/multipathnet/models/multipathnet.lua:34: in main chunk
    [C]: in function 'dofile'
    train.lua:104: in main chunk
    [C]: in function 'dofile'
    ...nder/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
    [C]: at 0x00406670

Out of curiosity, I checked, and classifier:remove(1) can only be called 7 times before going out of range (implying anything over 7 is out-of-bounds).

What might be going wrong here?

szagoruyko commented 8 years ago

@outgrabe just remove this line, see https://github.com/facebookresearch/multipathnet/issues/31 we will merge it to master when I get this CLA problem sorted