def make_layer_stack(layers=gin.REQUIRED, num_layers=6):
  """Configurable layer stack.

  Args:
    layers: a list of subclasses of TransformerLayer
    num_layers: an integer
  Returns:
    a LayerStack
  """
  return LayerStack([cls() for cls in layers] * num_layers)
Configurable layer stack.

  Args:
    layers: a list of subclasses of TransformerLayer
    num_layers: an integer
  Returns:
    a LayerStack