python/methylnet/interpretation_classes.py
def main_prediction_function(n_workers,batch_size, model, cuda):
    """Combine dataloader and prediction function into final prediction function that takes in tensor data, for Kernel Explanations.

    Parameters
    ----------
    n_workers : type
        Number of workers.
    batch_size : type
        Batch size for input data.
    model : type
        Model/predidction function.
    cuda : type
        Running on GPUs?

    Returns
    -------
    function
        Final prediction function.

    """
    dataloader_constructor=return_dataloader_construct(n_workers,batch_size)
    predict_function=return_predict_function(model, cuda)
    def main_predict(raw_beta_array):
        return predict_function(dataloader_constructor(raw_beta_array))
    return main_predict
Combine dataloader and prediction function into final prediction function that takes in tensor data, for Kernel Explanations.

    Parameters
    ----------
    n_workers : type
        Number of workers.
    batch_size : type
        Batch size for input data.
    model : type
        Model/predidction function.
    cuda : type
        Running on GPUs?

    Returns
    -------
    function
        Final prediction function.

    
Combine dataloader and prediction function into final prediction function that takes in tensor data, for Kernel Explanations.
Parameters

n_workers : type
Number of workers.
batch_size : type
Batch size for input data.
model : type
Model/predidction function.

Returns

function
Final prediction function.
Combine dataloader and prediction function into final prediction function that takes in tensor data for Kernel Explanations . Parameters n_workers : type Number of workers . batch_size : type Batch size for input data . model : type Model / predidction function . Returns function Final prediction function .
def main_prediction_function(n_workers,batch_size, model, cuda):
    dataloader_constructor=return_dataloader_construct(n_workers,batch_size)
    predict_function=return_predict_function(model, cuda)
    def main_predict(raw_beta_array):
        return predict_function(dataloader_constructor(raw_beta_array))
    return main_predict
def main_prediction_function ( n_workers , batch_size , model , cuda ) : dataloader_constructor = return_dataloader_construct ( n_workers , batch_size ) predict_function = return_predict_function ( model , cuda ) def main_predict ( raw_beta_array ) : return predict_function ( dataloader_constructor ( raw_beta_array ) ) return main_predict
Combine dataloader and prediction function into final prediction function that takes in tensor data, for Kernel Explanations.
Combine dataloader and prediction function into final prediction function that takes in tensor data for Kernel Explanations .
"""Combine dataloader and prediction function into final prediction function that takes in tensor data, for Kernel Explanations.

    Parameters
    ----------
    n_workers : type
        Number of workers.
    batch_size : type
        Batch size for input data.
    model : type
        Model/predidction function.
    cuda : type
        Running on GPUs?

    Returns
    -------
    function
        Final prediction function.

    """
n_workers
batch_size
model
cuda