Skip to content

Expected a value of type 'Tensor (inferred)' for argument 'input' but instead found type 'Optional[Tensor]'. #422

@gray5wolf

Description

@gray5wolf

[rank0]: forward(torch.torch.nn.modules.container.___torch_mangle_16.Sequential self, Tensor input) -> Tensor:
[rank0]: Expected a value of type 'Tensor (inferred)' for argument 'input' but instead found type 'Optional[Tensor]'.
[rank0]: Inferred 'input' to be of type 'Tensor' because it was not annotated with an explicit type.
[rank0]: :
[rank0]: File "/home/admin1/wespeaker/wespeaker/models/redimnet.py", line 623
[rank0]: skip = x
[rank0]: x = self.red_dim_conv(x)
[rank0]: x = self.tcm(x)
[rank0]: ~~~~~~~~ <--- HERE
[rank0]: x = self.exp_dim_conv(x)
[rank0]: return skip + x
I reported this error using redimnet.yaml. How to solve it?

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