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

About piecewise_linear_encoding #57

Closed
Minhvt34 opened this issue Aug 19, 2023 · 4 comments
Closed

About piecewise_linear_encoding #57

Minhvt34 opened this issue Aug 19, 2023 · 4 comments

Comments

@Minhvt34
Copy link

Hi Yura!

I have run the test code, which is mentioned in your code data.piecewise_linear_encoding
I have this error: RuntimeError: The size of tensor a (4) must match the size of tensor b (100) at non-singleton dimension 1

this error causes by is_last_bin = bin_indices + 1 == as_tensor(list(map(len, bin_edges)))

while bin_indices + 1 is a torch.Size([100, 4]), and as_tensor(list(map(len, bin_edges))) returns a torch.Size([100])

@Yura52
Copy link
Collaborator

Yura52 commented Aug 19, 2023

Hi! Are you referring to this code snippet?

@Minhvt34
Copy link
Author

Hi! Are you referring to this code snippet?

yes, I am trying to use piecewise linear encoding but there is an error as above.

@Yura52
Copy link
Collaborator

Yura52 commented Dec 21, 2023

Hi @Minhvt34 ! Sorry for such a long pause. There is now a new package that correctly implements piecewise-linear encoding and other embeddings:

@Minhvt34
Copy link
Author

Hi @Minhvt34 ! Sorry for such a long pause. There is now a new package that correctly implements piecewise-linear encoding and other embeddings:

Awesome! I am glad that you are still working on the project. I found your method works pretty well! Keep doing such a greate work.

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

2 participants