def _filter_scaling(reduction_indices, start_cell_num):
  """Compute the expected filter scaling at given PNASNet cell start_cell_num.

  In the pnasnet.py code, filter_scaling starts at 1.0. We instead
  adapt filter scaling to depend on the starting cell.
  At first cells, before any reduction, filter_scalling is 1.0. With passing
  any reduction cell, the filter_scaling is multiplied by 2.

  Args:
    reduction_indices: list of int indices.
    start_cell_num: int.
  Returns:
    filter_scaling: float.
  """
  filter_scaling = 1.0
  for ind in reduction_indices:
    if ind < start_cell_num:
      filter_scaling *= 2.0
  return filter_scaling