You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tf.unsorted_segment_sum exits without error message if segment_ids contains negative number. #466
and passing a tensor containing -1 as segment_ids, tensorflow just exits without error message. I'm on the current master.
Desired behavior in my case would be to these values are 'rejected', i. e. are not summed anywhere at all. Would it make sense to extend this method this way? And if not, can you give me an idea how to implement this behavior?
Using -1 to reject is interesting, but it turns coding errors into silent incorrect behavior so I'm leery of doing it. For now, you could replace -1s with a positive value represent an "ignored" class and then drop it.
It would be reasonable to add a boolean drop_negatives attr to ignore negative values, defaulted to false to preserve the existing error detection behavior.
Activity
girving commentedon Dec 10, 2015
Using -1 to reject is interesting, but it turns coding errors into silent incorrect behavior so I'm leery of doing it. For now, you could replace -1s with a positive value represent an "ignored" class and then drop it.
It would be reasonable to add a boolean
drop_negativesattr to ignore negative values, defaulted to false to preserve the existing error detection behavior.girving commentedon Dec 10, 2015
Ah, but the fact that it exits without the error message is a bad bug.
girving commentedon Dec 10, 2015
I'll fix the bug part now.
panmari commentedon Dec 11, 2015
Thanks for the fix, I'll open a new issue with my feature request.