def get_out_features(fc):
    """
    Determines the size of the output from a sequence of fully connected layers
    """
    i = -1
    while i < 0:  # will be set to out features to exit
        i = getattr(fc[i], 'out_features', i-1)
    return i