jraph/_src/deepsets_test.py
def deepset_update_global_fn(feats: jnp.ndarray) -> jnp.ndarray:
  """Global update function for graph net."""
  # we want to sum-pool all our encoded nodes
  #feats = feats.sum(axis=-1) # sum-pool
  net = hk.Sequential(
      [hk.Linear(128), jax.nn.elu,
       hk.Linear(30), jax.nn.elu,
       hk.Linear(11)]) # number of variabilities
  return net(feats)
Global update function for graph net.
Global update function for graph net.
Global update function for graph net .
def deepset_update_global_fn(feats: jnp.ndarray) -> jnp.ndarray:
  net = hk.Sequential(
      [hk.Linear(128), jax.nn.elu,
       hk.Linear(30), jax.nn.elu,
       hk.Linear(11)]) 
  return net(feats)
def deepset_update_global_fn ( feats : jnp . ndarray ) -> jnp . ndarray : net = hk . Sequential ( [ hk . Linear ( 128 ) , jax . nn . elu , hk . Linear ( 30 ) , jax . nn . elu , hk . Linear ( 11 ) ] ) return net ( feats )
Global update function for graph net.
Global update function for graph net .
"""Global update function for graph net.""" # we want to sum-pool all our encoded nodes #feats = feats.sum(axis=-1) # sum-pool # number of variabilities
feats
jnp.ndarray