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

NRMS Issue on running #8

Open
tnnanh1010 opened this issue Feb 16, 2025 · 0 comments
Open

NRMS Issue on running #8

tnnanh1010 opened this issue Feb 16, 2025 · 0 comments

Comments

@tnnanh1010
Copy link

Traceback (most recent call last):
File "/content/NewsRecommendation/src/main.py", line 295, in
train(None, args)
File "/content/NewsRecommendation/src/main.py", line 91, in train
bz_loss, y_hat = model(log_ids, log_mask, input_ids, targets)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/content/NewsRecommendation/src/model/NRMS.py", line 87, in forward
candidate_news_vecs = self.news_encoder(candidate_news).reshape(-1, 1 + self.args.npratio, self.args.news_dim)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: shape '[-1, 5, 400]' is invalid for input of size 70400

Are there any modification with NRMS encoder

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