MingiJi/FRSKD

The question about num_features

wnma3mz opened this issue · 0 comments

When Training with FRSKD,

In train, the first feat has been deleted in feat_lst.

feats = feats[-args.num_features:]
bi_feats, bi_outputs = bifpn(feats, args.distill == 'od')

But, in model bifpn forward, it still deletes the first feat.

def forward(self, feats, preact=False):
feats = feats[-self.num_features:]

My guess, based on network_channels, is that only one delete operation is required.

args.network_channels = model.network_channels[-args.num_features:]
bifpn = models.__dict__[args.bifpn](args.network_channels, args.num_classes, args)

So, the following line should also be deleted

feats = feats[-self.num_features:]