Closed michaelbrownid closed 3 years ago
I believe I have found the issue. torch.nn.CrossEntropyLoss "input is expected to contain raw, unnormalized scores for each class". Or in other words the "logit" scores before softmax rather than the probabilities after the softmax (somewhat poor choice of words on the pytorch docs page). Consequently the last apply_softmax in the model should be False in training; and True when you want to test and get final probabilities. "consensus_trainer.py" incorrectly has True during training
Hi @michaelbrownid ! Thank you for finding this issue and the solution :). We'll get that fix merged ASAP!
Hey @michaelbrownid! this issue is resolved in #167
Using variantworks simple_consensus_caller, train large model (RNN 512 units by 4 layers) on a single ZMW. I expect training loss to go to zero and accuracy to go to 100% as the number of model parameters is vastly larger than the training data size.
Run experiment with VariantWorks and then the exact same model in simplest pytorch implementation (included below).
ripBug.py