How to check if gradients of custom criterions are computed correctly?

19 views
Skip to first unread message

Synchro

unread,
Jan 13, 2017, 11:43:44 AM1/13/17
to torch7
Hey, just as the title say. 
Is there a common test module to check if the gradient of a custom loss are actually coherents? 

Thank you in advance 

Vislab

unread,
Jan 13, 2017, 6:16:23 PM1/13/17
to torch7
The test.lua file has alot of examples of how to test your criterion. See this MSECriterion example

Synchro

unread,
Jan 23, 2017, 9:03:49 PM1/23/17
to torch7
Yep, apparently I didn't turn on notifications for this post but I found that out later that day and I forgot to answer. 
I wrote multiple tests for custom criterions just using the exact same way.  

Thank you for the link anyway! A hi from Bologna across the region. :) 
Reply all
Reply to author
Forward
0 new messages