Giter VIP home page Giter VIP logo

convae_architecture's People

Contributors

landiisotta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

convae_architecture's Issues

Model

Hey, I got a question about the model you used: why did you decided to go for an Autoencoder rather than a Transformer? I couldn't find any information about that in the paper.

Best regards

Word2Vec Skip-Gram

Hi, I am interested to know about the pre-trained word2vec using Skip-gram which you have used in the code (patient_representations.py)
May I know, which pre-trained was loaded? (e.g. model = Word2Vec.load(emb_filename))
or did you run the word2vec training?

Thank you.

Loading of precomputed word2vec embeddings, and refinement during training

As far as I can tell the precomputed word2vec embeddings are not being loaded as the model is currently written. In model.py we have :

# load pre-computed embeddings
cnd_emb = pre_embs is not None
cnd_vocab = vocab is not None
if cnd_emb and cnd_vocab:
    weight_mtx = np.zeros((vocab_size, emb_size))
    wfound = 0
    for i in range(vocab_size):
        if i != 0:
            try:
                weight_mtx[i] = pre_embs[vocab[i]]
                wfound += 1
            except KeyError:
                weight_mtx[i] = np.random.normal(
                    scale=0.6, size=(emb_size,))
    print('Found pre-computed embeddings for {0} concepts'.format(
        wfound))
    self.embedding.from_pretrained(torch.FloatTensor(weight_mtx))

The final line does not update the existing self.embedding, instead it returns the pretrained embedding. It needs to be reassigned:

self.embedding = self.embedding.from_pretrained(torch.FloatTensor(weight_mtx))

As currently written the weight_mtx is computed then never used, and the embedding portion of the network starts from random initialisation and is trained as part of the model. Making the above change preloads the computed embeddings, but self.embedding.from_pretrained() also includes freeze = True by default, so with the above change the precomputed embeddings are loaded and then remain fixed during training. In the paper you say "These embedding vectors were then used as input for the ConvAE module and were further refined during the model training." Therefore it seems that what this line should be is:

self.embedding = self.embedding.from_pretrained(torch.FloatTensor(weight_mtx), freeze = False)

Vocabulary

I would like to know where can I find the vocabulary mentioned in your paper. I see you have added a snippet of the vocabulary in the github file. But I am trying to implement the vocabulary in my data set. Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.