So the output shape would correspond to [batch_size, nb_classes, frames]?
I’m not that familiar with the i3d model, but I assume the temporal (and spatial) dimensions were reduced somehow?
The current output format would correspond to a frame-wise multi-label classification.



 Pritesh_Gohil:

Each class have a single label. So I guess I should change network output from 2 to 1.


In that case, you could use nn.BCEWithLogitsLoss (or nn.BCELoss + sigmoid) with a since output channel. Alternatively you could keep the two output channels and use nn.CrossEntropyLoss.