Yard1 / ray-skorch

Distributed skorch on Ray Train
Apache License 2.0
57 stars 3 forks source link

Remove softmax from output #18

Closed rasbt closed 2 years ago

rasbt commented 2 years ago

I don't think there should be a softmax in the output layer if you use CrossEntropyLoss since CrossEntropyLoss takes logits as inputs (and performs a LogSoftmax internally): https://pytorch.org/docs/stable/generated/torch.nn.CrossEntropyLoss.html.

Yard1 commented 2 years ago

Have you tried running the code?

rasbt commented 2 years ago

No, the code generally doesn't work on my computer (getting import errors with the logger). Looking at it carefully, I can't see an issue with the fix. It should run ok.

rasbt commented 2 years ago

Fixed it in the example code so that it can be tested by the CI workflow

Yard1 commented 2 years ago

Thanks!