Group Abstract Group Abstract

Message Boards Message Boards

0
|
91 Views
|
2 Replies
|
1 Total Like
View groups...
Share
Share this post:

How to set up a simple feedforward classifying network on real input vectors

Posted 3 days ago

Why does this not work? Sorry, I'm a newbie with NNs.

POSTED BY: Iuval Clejan
2 Replies

The encoders and decoders are not layers but net port properties and you need to attached them to a port. This will work as you expect

dec = NetDecoder[{"Class", {"a", "b", "c"}}];
NNcompare = 
  NetInitialize@
   NetChain[{3, LogisticSigmoid, 3, LogisticSigmoid, 3, LogisticSigmoid, 3, 
     SoftmaxLayer[]}, "Output" -> dec, "Input" -> 2];
NNcompare[{1, 2}]

(* "b" *)

I have fixed the input size to be able to initialize the net and use it but that can also be done at training time (the size will be inferred from the training data).

Posted 2 days ago

Thank you! Do you know how to display the value of the loss function after it's done training? It shows it while the optimization is ongoing, but then the display disappears. Oh, never mind, I figured it out.

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