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

[Feature Request] Circular padding tensor operation #635

Closed
gartia opened this issue Dec 5, 2023 · 1 comment
Closed

[Feature Request] Circular padding tensor operation #635

gartia opened this issue Dec 5, 2023 · 1 comment

Comments

@gartia
Copy link

gartia commented Dec 5, 2023

Honestly i was trying to implement it myself, but i'm not very knowledgeable on c and the code base for ggml is pretty complicated.

In pytorch you can change padding types. I don't really have a use for the other ones, but circular padding would be extremely useful!
https://pytorch.org/docs/stable/generated/torch.nn.Conv2d.html

Example of circular padding

[ [1, 2, 3],
  [4, 5, 6],
  [7, 8, 9] ]
->
[ [9, 7, 8, 9, 7],
  [3, 1, 2, 3, 1],
  [6, 4, 5, 6, 4],
  [9, 7, 8, 9, 7],
  [3, 1, 2, 3, 1] ]

@gartia
Copy link
Author

gartia commented Dec 6, 2023

Actually got something working i'll do a pr after a bit of testing

@gartia gartia closed this as completed Dec 6, 2023
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