def get_submodel_constants(
    original_size, original_strides, total_depth, num_computations
):
    """get_submodel_constants
    Compute constants for submodel

    # Arguments
      original_size (int): spatial extent of original images
      original_strides (int): strides of first downsampling conv layer
      total_depth (int): total depth of the experiment
      num_computations (int): total number of moment computations

    # Returns
      spatial_size (int): spatial size of images in submodel
      num_submodels (int): number of submodels subdividing the total depth
          - each time the same Keras model is reused as submodel
          - each time it is randomly reinitialized
          - this leads to exactly the same behaviour as a randomly
              initialized model of depth equal to total_depth
          - but it requires less memory
      sub_depth (int): submodel depth
      delta_moments (int): interval between computation of moments
    """
    # num_submodels = 10 if 10 divides both num_computations and total_depth,
    # otherwise num_submodels = num_computations
    num_submodels = (
        10
        if ((num_computations % 10 == 0) and (total_depth % 10 == 0))
        else num_computations
    )

    spatial_size = original_size // original_strides
    sub_depth = total_depth // num_submodels
    delta_moments = total_depth // num_computations

    return spatial_size, num_submodels, sub_depth, delta_moments