Skip to content

Commit f34badf

Browse files
Update keras/src/utils/jax_layer.py
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 420223d commit f34badf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

keras/src/utils/jax_layer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323

2424
def standardize_pytree_collections(pytree):
25+
if isinstance(pytree, (str, bytes)):
26+
return pytree
2527
if isinstance(pytree, collections.abc.Mapping):
2628
return {k: standardize_pytree_collections(v) for k, v in pytree.items()}
2729
elif isinstance(pytree, collections.abc.Sequence):

0 commit comments

Comments
 (0)