Skip to content

Commit

Permalink
bugfix: removing nans from alphafold-multimer+templates
Browse files Browse the repository at this point in the history
  • Loading branch information
sokrypton authored Jun 17, 2022
1 parent 82933e1 commit bd696aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion alphafold/model/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def final_init(config):

def batched_gather(params, indices, axis=0, batch_dims=0):
"""Implements a JAX equivalent of `tf.gather` with `axis` and `batch_dims`."""
take_fn = lambda p, i: jnp.take(p, i, axis=axis)
take_fn = lambda p, i: jnp.take(p, i, axis=axis, mode="clip")
for _ in range(batch_dims):
take_fn = jax.vmap(take_fn)
return take_fn(params, indices)
Expand Down

0 comments on commit bd696aa

Please sign in to comment.