human
Complete this python program:
def conv_gru(inpts, mem, kw, kh, nmaps, rate, cutoff, prefix, do_layer_norm, args_len=None):
assistant
#Here is the Python program you requested.

    """Convolutional GRU.
    """
    def conv_lin(args, suffix, bias_start):
        total_args_len = (args_len or (len(args) * nmaps))
        res = conv_linear(args, kw, kh, total_args_len, nmaps, rate, True, bias_start, ((prefix + '/') + suffix))
        if do_layer_norm:
            return layer_norm(res, nmaps, ((prefix + '/') + suffix))
        else:
            return res
    if (cutoff == 1.2):
        reset = sigmoid_cutoff_12(conv_lin((inpts + [mem]), 'r', 1.0))
        gate = sigmoid_cutoff_12(conv_lin((inpts + [mem]), 'g', 1.0))
    elif (cutoff > 10):
        reset = sigmoid_hard(conv_lin((inpts + [mem]), 'r', 1.0))
        gate = sigmoid_hard(conv_lin((inpts + [mem]), 'g', 1.0))
    else:
        reset = sigmoid_cutoff(conv_lin((inpts + [mem]), 'r', 1.0), cutoff)
        gate = sigmoid_cutoff(conv_lin((inpts + [mem]), 'g', 1.0), cutoff)
    if (cutoff > 10):
        candidate = tanh_hard(conv_lin((inpts + [(reset * mem)]), 'c', 0.0))
    else:
        candidate = tf.tanh(conv_lin((inpts + [(reset * mem)]), 'c', 0.0))
    return ((gate * mem) + ((1 - gate) * candidate))