mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-17 11:38:21 +06:00
![]() This commit fixes the following errors: * Fix "expected all tensors to be on the same device" error * Fix "can't convert device type tensor to numpy" According to pytorch documentation torch.Tensor.numpy(force=False) performs conversion only if tensor is on CPU (plus few other restrictions) which is not the case. For our case we need force=True since we just need a data and don't care about tensors coherency. Fixes: #33517 See: https://pytorch.org/docs/2.4/generated/torch.Tensor.numpy.html Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com> |
||
---|---|---|
.. | ||
__init__.py | ||
test_modeling_flax_vision_text_dual_encoder.py | ||
test_modeling_tf_vision_text_dual_encoder.py | ||
test_modeling_vision_text_dual_encoder.py | ||
test_processor_vision_text_dual_encoder.py |