def sequential(inputs,
               layers,
               ):
  """Applies a sequence of layers to an input."""
  output = inputs
  for layer in layers.values():
    output = layer(output)
  return output