Deep-learning-activity-recognition
Deep-learning-activity-recognition copied to clipboard
Bug in code
trafficstars
Hello, you have a bug in your code, when you use nn.CrossEntropyLoss() it automatically applies softmax function, so you should input just raw outputs,but instead you input vector in softmax layer and then you apply it to nn.CrossEntropyLoss() loss, that is mistake. here is link: https://github.com/jindongwang/Deep-learning-activity-recognition/blob/6ec30f24c54f47d30fbaae875a9cd40aba256442/pytorch/main_pytorch.py#L23
@datonefaridze Much thanks for pointing this out! It is true that I shouldn't use F.softmax before nn.CrossEntropyLoss! I'll update the code.