How to build Iris classification network?

17 views
Skip to first unread message

thegoldenmeans0

unread,
Jun 20, 2019, 5:55:57 AM6/20/19
to DyNet Users
Hello, everyone!

I try to make iris classification program.
But, error value can not be converged as below.
error.png


I think that structure of last node is wrong in my neural network.In details,I think v11, v12, v13 nodes are wrong.






But I have no idea how to build correctly.


graph.png















Last node is build by following source code(Whole program is here).

----------------------------------------------------------------------------------------------------------------------------
int y_label_setosa = 0; //: setosa
int y_label_versicolor = 1; //: versicolor
int y_label_virginica = 2; //: virginica
dynet::Expression loss_expr_setosa = dynet::pickneglogsoftmax(y_pred, y_label_setosa); // Output layer (setosa)
dynet::Expression loss_expr_versicolor = dynet::pickneglogsoftmax(y_pred, y_label_versicolor); // Output layer (versicolor)
dynet::Expression loss_expr_virginica = dynet::pickneglogsoftmax(y_pred, y_label_virginica); // Output layer (virginica)
----------------------------------------------------------------------------------------------------------------------------

Additionally, I want to build following network.

structure.png



























Please tell me how to build classification network correctly or give me some hints.
If you need additional information, feel free reply this thread.

Thanks!
Reply all
Reply to author
Forward
0 new messages