Skip to content

Logical bug in the implementation of Threshold #1860

@caogang

Description

@caogang

Due to my fault of last implementation PR #1507 . :(
The logic of here is wrong.

torch/nn/_functions/thnn/activation.py

         else:
             grad_input = grad_output.masked_fill(input > ctx.threshold, 0)
         return grad_input, None, None, None

And this will cause some innormal value in my application.

I will fix it after a while.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions