JimLee1996 / AVSS2019

Efficient Violence Detection Using 3D Convolutional Neural Networks
MIT License
15 stars 10 forks source link

C3D model definition and load #8

Open davidGCR opened 3 years ago

davidGCR commented 3 years ago

Hi, great work. In your code, have you defined the original C3D model?. The pretrained model have three fully conected layers, and your implementation have only one. How are you loading this pretrained model?.

JimLee1996 commented 3 years ago

It's true that the original C3D networks have 3 FC layers (VGG-style, has much more parameters and is easier to be overfitted on small datasets). Here, we keep the feature extractor (ConvNet part), and replace FC layers with GAP and one FC layer, like most of modern networks do.

As for loading the pretrained model, specifically in PyTorch, just set strict=False in load_state_dict(). Please see here.

davidGCR commented 3 years ago

Thank you for your answer. I am getting the batch losses with NaN during C3D training using your code. Some idea why?.