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

Add padding _kwargs #13

Merged
merged 1 commit into from
Jul 11, 2023
Merged

Add padding _kwargs #13

merged 1 commit into from
Jul 11, 2023

Conversation

ASEM000
Copy link
Owner

@ASEM000 ASEM000 commented Jul 11, 2023

closes #12

Example

    @kex.kmap(
        kernel_size=(3,),
        padding=("same"),
        relative=False,
        padding_kwargs=dict(constant_values=10),
    )
    def f(x):
        return x

    x = jnp.array([1, 2, 3, 4, 5])

    np.testing.assert_allclose(
        f(x),
        np.array([[10, 1, 2], [1, 2, 3], [2, 3, 4], [3, 4, 5], [4, 5, 10]]),
    )

@ASEM000 ASEM000 merged commit 3130931 into main Jul 11, 2023
@ASEM000 ASEM000 deleted the padding_kwargs branch July 11, 2023 02:33
ASEM000 added a commit that referenced this pull request Jul 11, 2023
This reverts commit 3130931, reversing
changes made to 5d798c5.
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

Successfully merging this pull request may close these issues.

Document border handling with padding
1 participant