def get_source_points(tcdcn_cfNet, x, y_kpt_norm, num_model_kpts, use_tcdcn=False):
    """
    This method gets the source keypoints for training the model.
    Either a model's output or the true keypoints or a combination
    of two is taken as the source.

    paramers:
        num_model_kpts: the number of kpts to be used from cfNet model per example
                        default is all kpts
    returns: The keypoint locations upon which the model should
             train to denoise the output. It's a matrix of shape (#batch, #kpts)
    """
    # source_points is of shape (#batch, #kpts)
    if use_tcdcn:
        model_points = tcdcn_cfNet.model_prediction(x, dropout=0)
        num_batch, num_kpts = y_kpt_norm.shape
        source_points = model_points
    else:
        # in this case the true keypoint positions is taken as the source
        source_points = y_kpt_norm
    return source_points