When I upgraded MMDet to 3.3.0, I receive the following error message while training my model. My model was working fine with the previous MMDet version (v3.0.0)
AttributeError: 'SSDHead' object has no attribute 'loss_cls'
I think the error raised here because it tries to access loss_cls object that is never created.
I think the error happens during validation loss computation. self.loss_cls object is created here, but the SSDHead does not initialize its parent class. It initializes the super-parent class directly here.
So what probably happened is that when a new detector support was introduced in this commit, it was assumed that every sub/superclass has self.loss_cls defined. However for SSD this is not the case.
When I upgraded MMDet to 3.3.0, I receive the following error message while training my model. My model was working fine with the previous MMDet version (v3.0.0)
AttributeError: 'SSDHead' object has no attribute 'loss_cls'
I think the error raised here because it tries to access
loss_cls
object that is never created.I think the error happens during validation loss computation.
self.loss_cls
object is created here, but the SSDHead does not initialize its parent class. It initializes the super-parent class directly here.So what probably happened is that when a new detector support was introduced in this commit, it was assumed that every sub/superclass has self.loss_cls defined. However for SSD this is not the case.