Skip to content

UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. #8

@ZhaoXiangyu99

Description

@ZhaoXiangyu99

我在使用官方demo的时候,控制台有个warnng:
UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at ../torch/csrc/utils/tensor_new.cpp:230.)
ampl = torch.as_tensor(ampl, dtype=sig.dtype, device=sig.device).unsqueeze(-1)
请问应该怎么调整输入呢

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