When I was using weights of the model pretrained from my own dataset(using pytorch0.4.0), I modify the WEIGHTS line in yaml file and run the training file.
Actual results
Errors occur as belows:
WARNING cnn.py: 25: [====DEPRECATE WARNING====]: you are creating an object from CNNModelHelper class which will be deprecated soon. Please use ModelHelper object with brew module. For more information, please refer to caffe2.ai and python/brew.py, python/brew_test.py for more information.
WARNING memonger.py: 55: NOTE: Executing memonger to optimize gradient memory
[I memonger.cc:236] Remapping 83 using 19 shared blobs.
INFO memonger.py: 97: Memonger memory optimization took 0.018625974655151367 secs
WARNING memonger.py: 55: NOTE: Executing memonger to optimize gradient memory
[I memonger.cc:236] Remapping 83 using 19 shared blobs.
INFO memonger.py: 97: Memonger memory optimization took 0.017100811004638672 secs
INFO train.py: 194: Loading dataset: ('coco_2014_train',)
loading annotations into memory...
Done (t=0.01s)
creating index...
index created!
INFO roidb.py: 49: Appending horizontally-flipped training examples...
INFO roidb.py: 51: Loaded dataset: coco_2014_train
INFO roidb.py: 135: Filtered 2 roidb entries: 946 -> 944
INFO roidb.py: 67: Computing bounding-box regression targets...
INFO roidb.py: 69: done
INFO train.py: 198: 944 roidb entries
INFO net.py: 62: Loading weights from: /home/slashgns/detect/detectron/models/R-50.pkl
terminate called after throwing an instance of 'at::Error'
what(): UNKNOWN_BACKENDUNKNOWN_SCALARType is not enabled. (getType at /opt/conda/conda-bld/pytorch_1524584710464/work/aten/src/ATen/Context.h:36)
frame #0: at::UndefinedTensor::UndefinedTensor() + 0xb1 (0x7f65c459b0e1 in /home/slashgns/anaconda3/lib/python3.6/site-packages/torch/lib/libATen.so)
frame #1: <unknown function> + 0xf8bcb6 (0x7f65c437ecb6 in /home/slashgns/anaconda3/lib/python3.6/site-packages/torch/lib/libATen.so)
frame #2: <unknown function> + 0x101da (0x7f66a9e121da in /lib64/ld-linux-x86-64.so.2)
frame #3: <unknown function> + 0x102c3 (0x7f66a9e122c3 in /lib64/ld-linux-x86-64.so.2)
frame #4: <unknown function> + 0x14d00 (0x7f66a9e16d00 in /lib64/ld-linux-x86-64.so.2)
frame #5: <unknown function> + 0x10094 (0x7f66a9e12094 in /lib64/ld-linux-x86-64.so.2)
frame #6: <unknown function> + 0x1444b (0x7f66a9e1644b in /lib64/ld-linux-x86-64.so.2)
frame #7: <unknown function> + 0x102b (0x7f66a961802b in /lib/x86_64-linux-gnu/libdl.so.2)
frame #8: <unknown function> + 0x10094 (0x7f66a9e12094 in /lib64/ld-linux-x86-64.so.2)
frame #9: <unknown function> + 0x162d (0x7f66a961862d in /lib/x86_64-linux-gnu/libdl.so.2)
frame #10: dlopen + 0x31 (0x7f66a96180c1 in /lib/x86_64-linux-gnu/libdl.so.2)
frame #11: _PyImport_FindSharedFuncptr + 0x8a (0x7f66aa21352a in python)
frame #12: _PyImport_LoadDynamicModuleWithSpec + 0x140 (0x7f66aa23e2f0 in python)
frame #13: <unknown function> + 0x217540 (0x7f66aa23e540 in python)
frame #14: PyCFunction_Call + 0x131 (0x7f66aa13b711 in python)
frame #15: _PyEval_EvalFrameDefault + 0x542d (0x7f66aa1e94ad in python)
frame #16: <unknown function> + 0x1918e4 (0x7f66aa1b88e4 in python)
frame #17: <unknown function> + 0x192771 (0x7f66aa1b9771 in python)
frame #18: <unknown function> + 0x198505 (0x7f66aa1bf505 in python)
frame #19: _PyEval_EvalFrameDefault + 0x30a (0x7f66aa1e438a in python)
frame #20: <unknown function> + 0x19253b (0x7f66aa1b953b in python)
frame #21: <unknown function> + 0x198505 (0x7f66aa1bf505 in python)
frame #22: _PyEval_EvalFrameDefault + 0x30a (0x7f66aa1e438a in python)
frame #23: <unknown function> + 0x19253b (0x7f66aa1b953b in python)
frame #24: <unknown function> + 0x198505 (0x7f66aa1bf505 in python)
frame #25: _PyEval_EvalFrameDefault + 0x30a (0x7f66aa1e438a in python)
frame #26: <unknown function> + 0x19253b (0x7f66aa1b953b in python)
frame #27: <unknown function> + 0x198505 (0x7f66aa1bf505 in python)
frame #28: _PyEval_EvalFrameDefault + 0x30a (0x7f66aa1e438a in python)
frame #29: <unknown function> + 0x19253b (0x7f66aa1b953b in python)
frame #30: <unknown function> + 0x198505 (0x7f66aa1bf505 in python)
frame #31: _PyEval_EvalFrameDefault + 0x30a (0x7f66aa1e438a in python)
frame #32: _PyFunction_FastCallDict + 0x11b (0x7f66aa1b9bab in python)
frame #33: _PyObject_FastCallDict + 0x26f (0x7f66aa138b0f in python)
frame #34: _PyObject_CallMethodIdObjArgs + 0x100 (0x7f66aa17a810 in python)
frame #35: PyImport_ImportModuleLevelObject + 0x280 (0x7f66aa12fb10 in python)
frame #36: _PyEval_EvalFrameDefault + 0x2a0b (0x7f66aa1e6a8b in python)
frame #37: PyEval_EvalCodeEx + 0x329 (0x7f66aa1ba289 in python)
frame #38: PyEval_EvalCode + 0x1c (0x7f66aa1bb01c in python)
frame #39: <unknown function> + 0x1bac8b (0x7f66aa1e1c8b in python)
frame #40: PyCFunction_Call + 0x131 (0x7f66aa13b711 in python)
frame #41: _PyEval_EvalFrameDefault + 0x542d (0x7f66aa1e94ad in python)
frame #42: <unknown function> + 0x1918e4 (0x7f66aa1b88e4 in python)
frame #43: <unknown function> + 0x192771 (0x7f66aa1b9771 in python)
frame #44: <unknown function> + 0x198505 (0x7f66aa1bf505 in python)
frame #45: _PyEval_EvalFrameDefault + 0x30a (0x7f66aa1e438a in python)
frame #46: <unknown function> + 0x19253b (0x7f66aa1b953b in python)
frame #47: <unknown function> + 0x198505 (0x7f66aa1bf505 in python)
frame #48: _PyEval_EvalFrameDefault + 0x30a (0x7f66aa1e438a in python)
frame #49: <unknown function> + 0x19253b (0x7f66aa1b953b in python)
frame #50: <unknown function> + 0x198505 (0x7f66aa1bf505 in python)
frame #51: _PyEval_EvalFrameDefault + 0x30a (0x7f66aa1e438a in python)
frame #52: <unknown function> + 0x19253b (0x7f66aa1b953b in python)
frame #53: <unknown function> + 0x198505 (0x7f66aa1bf505 in python)
frame #54: _PyEval_EvalFrameDefault + 0x30a (0x7f66aa1e438a in python)
frame #55: _PyFunction_FastCallDict + 0x11b (0x7f66aa1b9bab in python)
frame #56: _PyObject_FastCallDict + 0x26f (0x7f66aa138b0f in python)
frame #57: _PyObject_CallMethodIdObjArgs + 0x100 (0x7f66aa17a810 in python)
frame #58: PyImport_ImportModuleLevelObject + 0x280 (0x7f66aa12fb10 in python)
frame #59: <unknown function> + 0x1a2fca (0x7f66aa1c9fca in python)
frame #60: PyCFunction_Call + 0xc6 (0x7f66aa13b6a6 in python)
frame #61: _PyEval_EvalFrameDefault + 0x542d (0x7f66aa1e94ad in python)
frame #62: <unknown function> + 0x1918e4 (0x7f66aa1b88e4 in python)
frame #63: <unknown function> + 0x192771 (0x7f66aa1b9771 in python)
Aborted (core dumped)
There was nothing wrong when I was using the official pretrained model(R-50 from ImageNet), so I am wondering whether it is because the difference between the pkl files. I use pickle to load the two files and compare theire differences.
My pretrained pickle file
It seems that there are tensors in my pickle file(which may be wrong?). Besides, the keys are also quite different. I am not familiar with caffe2 currently. Should I convert my pkl file to match official structure? Or is there any other solution?
When I was using weights of the model pretrained from my own dataset(using
pytorch0.4.0
), I modify theWEIGHTS
line in yaml file and run the training file.Actual results
Errors occur as belows:
There was nothing wrong when I was using the official pretrained model(R-50 from ImageNet), so I am wondering whether it is because the difference between the
pkl
files. I use pickle to load the two files and compare theire differences.My pretrained pickle file
The keys are
official pickle file
The keys are
It seems that there are
tensors
in my pickle file(which may be wrong?). Besides, the keys are also quite different. I am not familiar with caffe2 currently. Should I convert my pkl file to match official structure? Or is there any other solution?Detailed steps to reproduce
Modify the weights line in yaml file as below:
Then run the train_net.py
System information
PYTHONPATH
environment variable: ?python --version
output: ?