Group Abstract Group Abstract

Message Boards Message Boards

0
|
2.6K Views
|
2 Replies
|
3 Total Likes
View groups...
Share
Share this post:

SoftmaxLayer with one-hot vectors

Posted 1 year ago
POSTED BY: Byron Alexander
2 Replies

You need to manually set the LossFunction option in NetTrain; by default when the final layer is a SoftmaxLayer, the CrossEntropyLossLayer["Index"] is used, which is why you are getting the errors about not having integer outputs.

You want to set: `

NetTrain[net, trainingData, LossFunction->CrossEntropyLossLayer["Probabilities"]]

Explore the CrossEntropyLossLayer documentation for more details.

POSTED BY: Joshua Schrier

Thanks for your response. Yes this I have discovered recently. If you have a chance please have a look at my more recent post . Thanks for your time, keep well.

POSTED BY: Byron Alexander
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard