How to use pickneglogsoftmax function?

20 views
Skip to first unread message

thegoldenmeans0

unread,
Jun 14, 2019, 4:56:22 AM6/14/19
to DyNet Users
Hello, everyone!

I'm trying to make program with iris data-set.

I used pickneglogsoftmax() as loss function.
But I got segmentation fault.

Whole program is here.

I used that function as below.

dynet::Expresion y_pred = ...
unsinged int* y_label = 0
dynet::Expression loss_expr = dynet::pickneglogsoftmax(y_pred, y_label)

I'm glad if you tell me how to use pickneglogsoftmax().

Thanks.

Graham Neubig

unread,
Jun 15, 2019, 8:32:18 PM6/15/19
to thegoldenmeans0, DyNet Users
Change "unsigned int* y_label" to "unsigned int y_label" and you should be OK.

Graham

--
You received this message because you are subscribed to the Google Groups "DyNet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dynet-users...@googlegroups.com.
To post to this group, send email to dynet...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dynet-users/540a11c1-26fd-4ddb-9638-80098abcc3b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

thegoldenmeans0

unread,
Jun 18, 2019, 5:33:03 AM6/18/19
to DyNet Users
Thank you! 
Graham.

It was fixed.

2019年6月16日日曜日 9時32分18秒 UTC+9 Graham Neubig:
Change "unsigned int* y_label" to "unsigned int y_label" and you should be OK.

Graham

On Fri, Jun 14, 2019 at 4:56 AM thegoldenmeans0 <the.gol...@gmail.com> wrote:
Hello, everyone!

I'm trying to make program with iris data-set.

I used pickneglogsoftmax() as loss function.
But I got segmentation fault.

Whole program is here.

I used that function as below.

dynet::Expresion y_pred = ...
unsinged int* y_label = 0
dynet::Expression loss_expr = dynet::pickneglogsoftmax(y_pred, y_label)

I'm glad if you tell me how to use pickneglogsoftmax().

Thanks.

--
You received this message because you are subscribed to the Google Groups "DyNet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dynet...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages