Open wwdok opened 3 years ago
It seems that it is because gfl_cls
is ModuleList
type which means it doesn't inplement forward
method internally, if i change it to Sequential
type in nanodet_head.py
, this error will go away, but this is also not what we want :
(gfl_cls): Sequential(
(0): Conv2d(96, 112, kernel_size=(1, 1), stride=(1, 1))
(1): Conv2d(96, 112, kernel_size=(1, 1), stride=(1, 1))
(2): Conv2d(96, 112, kernel_size=(1, 1), stride=(1, 1))
)
because the 0
, 1
, 2
are three heads, we shouldn't excute them one by one.
Ah, it looks like the grad cam code is not well fit here, the situation become tough for me ...
Dear @RangiLyu , because i want to detect different types of vehicle, like sedan, police car, ambulance, fire truck, bus etc, so i want to implement Grad-CAM to check out what the model focus on when it is doing classification, then i try to use this repo's script to make it, but it happened some error. This is the adapted script :
And this is its error :
Could you please help me to make it work ? By the way, for my such fine-grained classification, do you have some suggestions ? Thanks in advance !