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

Compiler doesn't support numerical Maps with negative output values #24

Open
langosco opened this issue Jan 25, 2024 · 0 comments
Open

Comments

@langosco
Copy link
Contributor

Currently, the compiler doesn't support programs with numerical Maps that have negative output values for some inputs (cf PR #13).

For example, the program

 out = rasp.numerical(rasp.Map(lambda x: x - 1, rasp.tokens))

raises an error when compiled with vocab={0,1,2} (or any vocab including values <= 0).

It would be nice to support this; for example, negative values could be shifted by a bias parameter.

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