Skip to content

numerical stability for logSigmoid #1835

@binxuan

Description

@binxuan

Hi,

I am using pytorch to implement a word2vec-like model. I frequently faced overflow/underflow with logsigmoid operation.

For example, if I run pytorch like this F.logsigmoid(autograd.Variable(torch.FloatTensor([-300.0]))) the result is -inf. It would be better if pytorch could implement the logsigmoid with overflow check.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions