Skip to content

Commit f26fda5

Browse files
jakevdpwang-xianghao
authored andcommitted
Switch jnp.reshape from newshape to shape paramter. (keras-team#20469)
The newshape parameter was deprecated in JAX v0.4.28, and will soon be removed.
1 parent 9ca1226 commit f26fda5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

keras/src/backend/jax/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ def affine_transform(
464464
# transform the indices
465465
coordinates = jnp.einsum("Bhwij, Bjk -> Bhwik", indices, transform)
466466
coordinates = jnp.moveaxis(coordinates, source=-1, destination=1)
467-
coordinates += jnp.reshape(a=offset, newshape=(*offset.shape, 1, 1, 1))
467+
coordinates += jnp.reshape(a=offset, shape=(*offset.shape, 1, 1, 1))
468468

469469
# apply affine transformation
470470
_map_coordinates = functools.partial(

0 commit comments

Comments
 (0)