Closed BBBoundary closed 3 years ago
Hi, the feature is from the layer before the last fc-layer. I made two changes
diff --git a/models/resnext.py b/models/resnext.py
index 857560f..c604983 100644
--- a/models/resnext.py
+++ b/models/resnext.py
@@ -118,7 +118,7 @@ class ResNeXt(nn.Module):
for m in self.modules():
if isinstance(m, nn.Conv3d):
- m.weight = nn.init.kaiming_normal(m.weight, mode='fan_out')
+ m.weight = nn.init.kaiming_normal_(m.weight, mode='fan_out')
elif isinstance(m, nn.BatchNorm3d):
m.weight.data.fill_(1)
m.bias.data.zero_()
@@ -169,7 +169,7 @@ class ResNeXt(nn.Module):
x = self.avgpool(x)
x = x.view(x.size(0), -1)
- x = self.fc(x)
+ #x = self.fc(x)
return x
Hope this can help~
Thanks for your quick reply~ But unfortunately we are new to this field, so we still can't this problem. We modified the code according to your help but it still reported the previous error. We guess there's something wrong with the previous code or we misunderstood your method. Since we don't have much experience in coding of Deep Learning, we hope we can learn from solving this problem. So it'll be highly appreciated if you can send the models files(resnet.py, resnext.py etc.) to our email@culaccino_9350@163.com QAQ!!
Hello,sir. When I try the code you open to extract motion features, I have the same problem.
TypeError: init() got an unexpected keyword argument 'in_planes
May you give the model file such as resnet.py resnext.py to the email 1552981316@qq.com. Thank you very much,sir
Thanks for your quick reply~ But unfortunately we are new to this field, so we still can't this problem. We modified the code according to your help but it still reported the previous error. We guess there's something wrong with the previous code or we misunderstood your method. Since we don't have much experience in coding of Deep Learning, we hope we can learn from solving this problem. So it'll be highly appreciated if you can send the models files(resnet.py, resnext.py etc.) to our email@culaccino_9350@163.com QAQ!!
Hi,have you solved this problem?
Hi, I uploaded the files in 3D-ResNets-Pytorch/models @tangyuhao2016
Hello!I'm trying to use your project code to test my own video. Thanks for providing the code to extract the features. We import the models in 3D-ResNets-Pytorch demo you linked into the misc folder, but we have the following problems when extracting 3D features:
I wonder how to solve this problem. Thanks!