I got this error on run tools/train_net.py.
Traceback (most recent call last):
File "tools/train_net.py", line 171, in <module>
main()
File "tools/train_net.py", line 164, in main
model = train(cfg, args.local_rank, args.distributed)
File "tools/train_net.py", line 73, in train
arguments,
File "/content/maskrcnn-benchmark/maskrcnn_benchmark/engine/trainer.py", line 66, in do_train
loss_dict = model(images, targets)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 489, in __call__
result = self.forward(*input, **kwargs)
File "/content/maskrcnn-benchmark/maskrcnn_benchmark/modeling/detector/generalized_rcnn.py", line 50, in forward
proposals, proposal_losses = self.rpn(images, features, targets)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 489, in __call__
result = self.forward(*input, **kwargs)
File "/content/maskrcnn-benchmark/maskrcnn_benchmark/modeling/rpn/rpn.py", line 100, in forward
return self._forward_train(anchors, objectness, rpn_box_regression, targets)
File "/content/maskrcnn-benchmark/maskrcnn_benchmark/modeling/rpn/rpn.py", line 119, in _forward_train
anchors, objectness, rpn_box_regression, targets
File "/content/maskrcnn-benchmark/maskrcnn_benchmark/modeling/rpn/loss.py", line 129, in __call__
reduction='sum',
TypeError: smooth_l1_loss() got an unexpected keyword argument 'reduction'
Steps to reproduce the behavior:
python setup.py build develop python tools/train_net.py --config-file configs/e2e_faster_rcnn_R_50_C4_1x.yamlCollecting environment information...
PyTorch version: 1.0.0
Is debug build: No
CUDA used to build PyTorch: 9.0.176
OS: Ubuntu 18.04.1 LTS
GCC version: (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
CMake version: version 3.12.0
Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: 9.2.148
GPU models and configuration: GPU 0: Tesla K80
Nvidia driver version: 396.44
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.7.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_static_v7.a
/usr/local/lib/python2.7/dist-packages/cupy/_lib/libcudnn.so.7
/usr/local/lib/python3.6/dist-packages/cupy/_lib/libcudnn.so.7
Versions of relevant libraries:
[pip] Could not collect
[conda] Could not collect
conda, pip, source): pippython setup.py build developIt seems that this error caused by the latest PR (#359 ).
Thanks for the heads up, I've reverted the offending PR https://github.com/facebookresearch/maskrcnn-benchmark/pull/364
Most helpful comment
Thanks for the heads up, I've reverted the offending PR https://github.com/facebookresearch/maskrcnn-benchmark/pull/364