facebookresearch / facebookresearch/SlowFast

Small error in Kinetics model output head (validation loss only)

Open
#128 0 comments 3 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
7.4k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

Hi! In initializing output heads for Kinetics, it seems the network will add a `self.act()` layer to all non-training models. This includes testing, but also validation.
https://github.com/facebookresearch/SlowFast/blob/master/slowfast/models/head_helper.py#L213

As a result, since this is set to `softmax` -- the model will apply `softmax` to validation outputs when training with `cross_entropy` loss -- all defaults.

This means the Top-1 and Top-5 error for validation report correctly, but validation loss is incorrect. Not a big deal if just loading pre-trained model, but noticeable when training for scratch, or if adding your own output heads to a pre-trained Kinetics model.

Apologies if I got something wrong, but pretty sure this is what's happening. Love the repo!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.