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

Use lax.conv_general_dilated_patches to extract image patches in time linear to the number of channels (vs quadratic). #630

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

copybara-service[bot]
Copy link

@copybara-service copybara-service bot commented Dec 14, 2022

Use lax.conv_general_dilated_patches to extract image patches in time linear to the number of channels (vs quadratic).

Note that complexity of extract_patches is quadratic in the number of channels C, while lax.conv_general_dilated_patches is linear due to using depthwise convolution. AFAIK extract_image_patches has the same linear complexity, but can be shortened by calling to lax.conv_general_dilated_patches as well.

@copybara-service copybara-service bot changed the title Use lax.conv_general_dilated_patches to extract image patches. Use lax.conv_general_dilated_patches to extract image patches in time linear to the number of channels (vs quadratic). Dec 14, 2022
…me linear to the number of channels (vs quadratic).

Note that complexity of `extract_patches` is quadratic in the number of channels `C`, while `lax.conv_general_dilated_patches` is linear due to using depthwise convolution. AFAIK `extract_image_patches` has the same linear complexity, but can be shortened by calling to `lax.conv_general_dilated_patches` as well.

PiperOrigin-RevId: 495102958
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.

None yet

1 participant