Closed Decade-Li closed 1 year ago
Hi, i had the same problem when i was trying to run the model. If you check the logs in the training examples that they have in google drive, you can find this warning:
To fix this problem i had to modify detectron2 code https://github.com/facebookresearch/detectron2/blob/58e472e076a5d861fdcf773d9254a3664e045bf8/detectron2/modeling/backbone/resnet.py#L542
Just change "first_stride" key for "stride"
if "first_stride" in list(curr_kwargs.keys()):
_stride = curr_kwargs["first_stride"]
del curr_kwargs["first_stride"]
curr_kwargs["stride"] = _stride
I've met the same question, and solve this by degrading detectron2 to v0.3
What is the first_stride parameter set when initializing blocks in the Res5ROIHeads class? TypeError: init() got an unexpected keyword argument 'first_stride' Try to solve: Convert first_stride=2 to stride_per_block=[2, 1, 1]。 But,“TypeError: add(): argument 'alpha' must be Number, not NoneType”. Then, But,"FloatingPointError: Predicted boxes or scores contain Inf/NaN. Training has diverged."