Skip to content

Commit

Permalink
No public description
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 580799521
  • Loading branch information
Jake VanderPlas authored and copybara-github committed Nov 9, 2023
1 parent a9b35bc commit efcf732
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vmoe/nn/vit_moe_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def test_position_embedding_learned(self):
'encoder_norm': {'bias': jnp.zeros(8), 'scale': jnp.ones(8)},
},
}, x)
expected_y = jax.nn.normalize(
expected_y = jax.nn.standardize(
jnp.concatenate([pos_embedding, pos_embedding]), axis=-1)
chex.assert_trees_all_close(y, expected_y)

Expand Down Expand Up @@ -124,7 +124,7 @@ def test_position_embedding_sincos2d(self, seq_len, pos_embedding):
'params': {'encoder_norm': {'bias': jnp.zeros(8), 'scale': jnp.ones(8)}}
}, x)
pos_embedding = jnp.asarray(pos_embedding)
expected_y = jax.nn.normalize(
expected_y = jax.nn.standardize(
jnp.concatenate([pos_embedding, pos_embedding]), axis=-1)
chex.assert_trees_all_close(y, expected_y, rtol=1e-3)

Expand Down

0 comments on commit efcf732

Please sign in to comment.