Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
f8f9a679
Unverified
Commit
f8f9a679
authored
Jul 12, 2021
by
Suraj Patil
Committed by
GitHub
Jul 12, 2021
Browse files
fix type check (#12638)
parent
2dd9440d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/transformers/file_utils.py
src/transformers/file_utils.py
+2
-2
No files found.
src/transformers/file_utils.py
View file @
f8f9a679
...
...
@@ -1715,10 +1715,10 @@ def is_tensor(x):
return
True
if
is_flax_available
():
import
jax
lib.xla_extension
as
jax_xla
import
jax
.numpy
as
jnp
from
jax.core
import
Tracer
if
isinstance
(
x
,
(
j
ax_xla
.
DeviceA
rray
,
Tracer
)):
if
isinstance
(
x
,
(
j
np
.
nda
rray
,
Tracer
)):
return
True
return
isinstance
(
x
,
np
.
ndarray
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment