def make_convparams(nout, filter_shape, strides, padding, dilation):
    """
    Make the convparams dictionary to be used by core ngraph

    Arguments:
        nout (int): Number of output filters
        filter_shape (dict): int filter shape with keys of "D", "H", and "W"
        strides (dict): int strides with keys of "D", "H", and "W"
        padding: int padding with keys of "D", "H", and "W"
        dilation: int dilation with keys of "D", "H", and "W"

    Returns:
        Properly formatted convparams dictionary
    """
    convparams = dict()
    convparams["K"] = nout

    for ng_name, filter_name in zip('TRS', 'DHW'):
        convparams[ng_name] = filter_shape[filter_name]

    for name in "DHW":
        for prefix, prop in zip(("str", "pad", "dil"),
                                (strides, padding, dilation)):
            convparams["{}_{}".format(prefix, name.lower())] = prop[name]

    return convparams