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

Question about the "wrap" padding mode #13

Open
Ang-Li-95 opened this issue Feb 20, 2024 · 0 comments
Open

Question about the "wrap" padding mode #13

Ang-Li-95 opened this issue Feb 20, 2024 · 0 comments

Comments

@Ang-Li-95
Copy link

Dear Huilin,

Sorry to bother you and thanks a lot for this handy package!

I have some question about the "wrap" padding mode in the data loader. If I understand correctly, assuming a jagged array as below:
array = [ [1,2,3], [4,5] ]

Doing a "wrap" padding to make the array have the shape of (2,6), in which case each row has 6 elements, will give us:
array_pad = [ [1,2,3,1,2,3], [4,5,4,5,4,5] ]

In the code, I think the "wrap" padding is performed through this function.
And padding the array mentioned above using the _repeat_pad function gives us:
array_pad = [ [1,2,3,4,5,1], [4,5,4,5,1,2] ]

I am wondering whether I misunderstood the concept of "wrap" padding or this is a bug in the implementation?

Thank you in advance and I look forward to your reply!

Best regards,
Ang

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