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

But in layers.cpp #38

Open
erlebach opened this issue Aug 7, 2022 · 0 comments
Open

But in layers.cpp #38

erlebach opened this issue Aug 7, 2022 · 0 comments

Comments

@erlebach
Copy link

erlebach commented Aug 7, 2022

Hi,

In layer.py, class FeaturesEmbedding, one finds the line

self.offsets = np.array(0, *np.cumsum(field_dims)[:-1]), dtype=np.long)

My code generates an error. I replaced np.array by torch.tensor and np.cumsum by torch.cumsum , and the code works.

I believe the code as it is has a bug, which was fixed with my change. Could you please confirm this? I am not sure how the code can work as is. thanks.

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