Skip to content

[complex] torch.sigmoid: sigmoid does not support automatic differentiation for outputs with complex dtype #48552

@kshitij12345

Description

@kshitij12345
import torch
x = torch.tensor(1, dtype=torch.cfloat)
x.requires_grad = True
y = torch.sigmoid(x)
y.backward()

Output:

Traceback (most recent call last):
  File "test/test_exp.py", line 16, in <module>
    y = torch.sigmoid(x)
RuntimeError: sigmoid does not support automatic differentiation for outputs with complex dtype.

cc @ezyang @anjali411 @dylanbespalko @mruberry @lezcano

Metadata

Metadata

Assignees

No one assigned

    Labels

    complex_autogradfunction requestA request for a new function or the addition of new arguments/modes to an existing function.module: complexRelated to complex number support in PyTorchtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions