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

med2vec model class #2

Open
victorconan opened this issue Nov 17, 2020 · 0 comments
Open

med2vec model class #2

victorconan opened this issue Nov 17, 2020 · 0 comments

Comments

@victorconan
Copy link

In the med2vec.py, there is a self.embedding in the __init__, and there is an embedding as method. In the forward method, which one is being used?

class Med2Vec(BaseModel):
    def __init__(self, icd9_size, demographics_size=0, embedding_size=2000, hidden_size=100,):
       ...
        self.embedding = nn.Embedding(self.vocabulary_size, self.embedding_size)
...


    def embedding(self, x):
        return F.linear(x, self.embedding_w, self.embedding_b)
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