def dnn_mask(dnn_acts, channels=None, rows=None, columns=None):
    """
    Extract DNN activation

    Parameters:
    ----------
    dnn_acts[array]: DNN activation
        A 4D array with its shape as (n_stim, n_chn, n_row, n_col)
    channels[list]: sequence numbers of channels of interest.
    rows[list]: sequence numbers of rows of interest.
    columns[list]: sequence numbers of columns of interest.

    Return:
    ------
    dnn_acts[array]: DNN activation after mask
        a 4D array with its shape as (n_stim, n_chn, n_row, n_col)
    """
    if channels is not None:
        channels = [chn-1 for chn in channels]
        dnn_acts = dnn_acts[:, channels, :, :]
    if rows is not None:
        rows = [row-1 for row in rows]
        dnn_acts = dnn_acts[:, :, rows, :]
    if columns is not None:
        columns = [col-1 for col in columns]
        dnn_acts = dnn_acts[:, :, :, columns]

    return dnn_acts