Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a tensor from a list of numpy.ndarrays is extremely slow #367

Closed
skol101 opened this issue Jun 3, 2022 · 1 comment
Closed

Comments

@skol101
Copy link

skol101 commented Jun 3, 2022

FYI on v 0.5.4. Maybe this has been fixed?

train.py:600: 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 /opt/conda/conda-bld/pytorch_1640811806235/work/torch/csrc/utils/tensor_new.cpp:201.)
y_batch = torch.tensor(y_batch, dtype=torch.float).unsqueeze(1) # (B, 1, T)

kan-bayashi added a commit that referenced this issue Jun 6, 2022
@kan-bayashi
Copy link
Owner

Than you for your report. Fixed in #367.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants