Skip to content

A mistake in train.py line 48 #32

@705062791

Description

@705062791

the code is:

log_p = torch.log_softmax(pred_score, dim=1).reshape(-1, n_class)

where "pred_score" is a (n_batch, n_class, n_frame) tensor. then, doing log_softmax on it and reshape it in (-1,n_class). However, function "reshape" default in "Row first" mode, and we need "Col frist" mode here. the right code is:

log_p = torch.log_softmax(pred_score, dim=1).permute(0,2,1).reshape(-1, n_class)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions