yjxiong / tsn-pytorch

Temporal Segment Networks (TSN) in PyTorch
BSD 2-Clause "Simplified" License
1.07k stars 310 forks source link

problem about VGG module #107

Closed pangweilun closed 4 years ago

pangweilun commented 4 years ago

Hi, @yjxiong I read your paper and also went through your code. I have few things unclear while implementing. l want to trian with vgg16,but it cannot work

File "/home3/pangweilun/tsn-pytorch-master/models.py", line 41, in init feature_dim = self._prepare_tsn(num_class) File "/home3/pangweilun/tsn-pytorch-master/models.py", line 62, in _prepare_tsn feature_dim = getattr(self.base_model, self.base_model.last_layer_name).in_features File "/usr/local/lib/python3.5/dist-packages/torch/nn/modules/module.py", line 398, in getattr type(self).name, name)) AttributeError: 'VGG' object has no attribute 'fc'

would you teach me how to resolve it?