Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace model runner function by preprocessing function #806

Open
loostrum opened this issue Jun 19, 2024 · 1 comment
Open

Replace model runner function by preprocessing function #806

loostrum opened this issue Jun 19, 2024 · 1 comment

Comments

@loostrum
Copy link
Member

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?

@loostrum
Copy link
Member Author

loostrum commented Jun 19, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant