-
Notifications
You must be signed in to change notification settings - Fork 27
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
代码问题 #50
Comments
这个警告信息表明,当前代码在将 numpy.ndarray 列表转换为 PyTorch 张量时速度非常慢。具体原因是,transformers 库中的 feature_extraction_utils.py 正在逐个元素地将列表转换为张量,这种方法会导致较高的计算开销 |
您好,非常感谢您对我们工作的关注。我们将尽快排查下具体是啥问题,明晚之前给您回复。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
尊敬的作者您好!
我在运行bash scripts/pretrain_fb15k-237-image.sh时有以下警告:
1、/root/miniconda3/envs/MKGformer/lib/python3.8/site-packages/transformers/feature_extraction_utils.py:158: 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:210.)
tensor = as_tensor(value)
2、另外,每一个epoch结束后,是进行了100%,但是为什么终端显示的都是50%
如下:
Epoch 2: 50%|██████████████████████████████████████████████████████████████████████████▌ | 234/468 [02:28<02:28, 1.58it/s, loss=8.93, v_num=1, hits10=0.232, hits1=0.141]
/root/miniconda3/envs/MKGformer/lib/python3.8/site-packages/transformers/feature_extraction_utils.py:158: 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:210.)
tensor = as_tensor(value)
/root/miniconda3/envs/MKGformer/lib/python3.8/site-packages/transformers/feature_extraction_utils.py:158: 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:210.)
tensor = as_tensor(value)
/root/miniconda3/envs/MKGformer/lib/python3.8/site-packages/transformers/feature_extraction_utils.py:158: 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:210.)
tensor = as_tensor(value)
/root/miniconda3/envs/MKGformer/lib/python3.8/site-packages/transformers/feature_extraction_utils.py:158: 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:210.)
tensor = as_tensor(value)
3、还提示我数据集中有损坏的图片,我不明白这是什么意思,我直接从所给出的google链接下载的数据集。
我想知道有问题的图片是说的下图所示这种吗?还是什么意思?
还请作者解答疑惑!感激不尽!
The text was updated successfully, but these errors were encountered: