Comments (25)
the same problem~
I had an issue with the embeddings I fixed it initializing the embedding layer with the right size which is the size of the vocabulary I am using.
when creating your Encoder/Model:
self.embed = nn.Embedding(vocab_size, embed_size)
I was using a smaller number than my actual vocab_size thus resulting in an error.
from deepfm_with_pytorch.
Hi, try to inspect the size of your vocabulary , if using the vocab_size
in the Embedding layer initialization, try to add +1 to it like -> self.embed = nn.Embedding(vocab_size+1, embed_size)
from deepfm_with_pytorch.
Did anyone get the solution? I'm stuck! just wanted to confirm what vocab_size here means. Does it mean the length of the tokenized words set?
from deepfm_with_pytorch.
It happened to me when I had out-of-vocabulary words which were assigned a -1 value, and also it happens when you set the vocab-size to a smaller value than the size of the vocabulary + 1
from deepfm_with_pytorch.
Hey guys, I had the same problem. In my case, what happened was that I was presenting the Input (X) and the Output (Y) to the model with len(X) != len(Y) due to an error in a third-party library.
Best regards and good luck!
from deepfm_with_pytorch.
Hi, try to inspect the size of your vocabulary , if using the
vocab_size
in the Embedding layer initialization, try to add +1 to it like ->self.embed = nn.Embedding(vocab_size+1, embed_size)
Hi, this works. But would you mind providing an explanation for this?
I guess it was a bug, which is now fixed by @chenxijun1029 .
What I remember is that the error is because embedding_dim must be equal to the vocab size, but when initializing the embedding layer with len(voca_size) it somehow subtracts 1.
from deepfm_with_pytorch.
hi~
anybody know how to fix this issue?
thanks!
from deepfm_with_pytorch.
the same problem~
from deepfm_with_pytorch.
the same problem~
from deepfm_with_pytorch.
the same problem~
from deepfm_with_pytorch.
same problem
from deepfm_with_pytorch.
Same issue when using flair0.4.1, pythorch1.1.0 and BertEmbeddings on 2 x NVIDIA Tesla P100
from deepfm_with_pytorch.
the same problem
from deepfm_with_pytorch.
the same problem
from deepfm_with_pytorch.
same issue
from deepfm_with_pytorch.
hi, is anybody fix the problem?
from deepfm_with_pytorch.
we have the same problem using LASER bi-LSTM model with PyTorch 1.0 / Python 3.7
https://github.com/facebookresearch/LASER
from deepfm_with_pytorch.
Sorry for answering so late!
I think I've fixed this bug. The main reason is that I accumulated offset when iterate feature size in data preprocess, so index of categorial feature is out of embedding size. Please refer to the update in dataPreprocess.py.
Also, I've found that I should set the index of coutinous feature as 0, and the value of coutinous feature as its original value instead of 1. Refer to the update of dataset.py for more details.
Thanks for your attention.
from deepfm_with_pytorch.
@chenxijun1029 in which version this has been fixed? Thank you.
from deepfm_with_pytorch.
the same problem~
I had an issue with the embeddings I fixed it initializing the embedding layer with the right size which is the size of the vocabulary I am using.
when creating your Encoder/Model:
self.embed = nn.Embedding(vocab_size, embed_size)
I was using a smaller number than my actual vocab_size thus resulting in an error.
Hi. I too resolved my issue by fixing what @mcszn suggested.
from deepfm_with_pytorch.
Hi, try to inspect the size of your vocabulary , if using the
vocab_size
in the Embedding layer initialization, try to add +1 to it like ->self.embed = nn.Embedding(vocab_size+1, embed_size)
Hi, this works. But would you mind providing an explanation for this?
from deepfm_with_pytorch.
Hi, try to inspect the size of your vocabulary , if using the
vocab_size
in the Embedding layer initialization, try to add +1 to it like ->self.embed = nn.Embedding(vocab_size+1, embed_size)
Hi, this works. But would you mind providing an explanation for this?
I guess it was a bug, which is now fixed by @chenxijun1029 .
What I remember is that the error is because embedding_dim must be equal to the vocab size, but when initializing the embedding layer with len(voca_size) it somehow subtracts 1.
got it. thanks very much.
from deepfm_with_pytorch.
same issue
from deepfm_with_pytorch.
Hi, try to inspect the size of your vocabulary , if using the
vocab_size
in the Embedding layer initialization, try to add +1 to it like ->self.embed = nn.Embedding(vocab_size+1, embed_size)
Why +1 will solve the problem,The initialization of embedding should not be used vocab_size rather than vocab_size+1?
from deepfm_with_pytorch.
I have the same issue. See DeepFM_with_PyTorch/data/dataset.py
Row7 : continous_features = 13
.
Change the value for your dataset. You can have a correct result.
from deepfm_with_pytorch.
Related Issues (9)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deepfm_with_pytorch.