def layer_config(config, layer, layer_type='conv'):
  """layerwise configuration for a given layer-number, type and config

  Args:
      config: training configuration sampled from hyperband search space
      layer: layer number
      layer_type: whether conv layer or fc layer

  Returns:
      1. activation name
      2. hidden-units size in case of fc layer_type
         output channel size in case of conv layer_type
      3. whether or not maxpool if conv layer_type
         dropout value in case fc layer_type
  """
  layer = layer_type + '_' + 'layer_' + str(layer)
  if layer_type == 'conv':
    return config[layer + '_activation'], config[layer + '_size'], config[layer + '_maxpool']
  return config[layer + '_activation'], config[layer + '_size'], config[layer + '_dropout']