def _get_attention_sizes(resnet_size):
  """The number of block layers used for the Resnet model varies according
  to the size of the model. This helper grabs the layer set we want, throwing
  an error if a non-standard size has been selected.
  """
  choices = {
      18: [False, [False, True], [True, False], False],
      34: [False, [False, True, True, False], False, False],
      50: [False, [False, False, False, False], True, False],
      101: [False, False, True, True],
      152: [False, False, True, True],
      200: [False, False, True, True]
  }

  try:
    return choices[resnet_size]
  except KeyError:
    err = (
          'Could not find layers for selected Resnet size.\n'
          'Size received: {}; sizes allowed: {}.'.format(
              resnet_size, choices.keys()))
  raise ValueError(err)