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

converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor #28

Open
lllxf opened this issue May 6, 2024 · 0 comments

Comments

@lllxf
Copy link

lllxf commented May 6, 2024

usr/local/lib/python3.7/site-packages/transformers/tokenization_utils_base.py:705: 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.)
tensor = as_tensor(value)

I am trying to load the model using a previously trained checkpoint file and it takes a long time to skip the previous data and has the above warning, how can I solve it?

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

1 participant