dianna-ai/dianna

Replace model runner function by preprocessing function

Opened this issue · 1 comments

In a lot of the more recent tutorials a run_model function is defined, with reasoning such as

"A runner function is required since the model works with input in the order of [channels, timeseries], while LIME in DIANNA should receive input in the opposite order."

However, things like this is why we added the preprocess_function option. It's meant to be simpler than defining an entire model runner function. Should we replace the model runners by the preprocess_function where possible?

Example of a transpose + data type change similar to how it's used in the FRB tutorial:

def preprocess(data):
    return np.transpose(data, (0, 2, 1)).astype(np.float32)