Comments (7)
I went ahead and added the word embeddings I've been using to Github
from keras-language-modeling.
Did you download the dataset from here? I'm not sure which resource it could be. Could you reproduce the error message?
Yep, the word2vec_100_dim.h5
was the output of using Gensim's Word2Vec model merged with the result of training a 100-dimension EmbeddingModel
. I haven't formalized this yet, mostly I've been trying out different word embeddings to see what works. I think once something works well I will put the weight file on Github for general use.
I'd appreciate it if you wanted to open a PR for a stand-alone script. Let me know if you have more questions.
from keras-language-modeling.
Which word2vec output you are considering here ?
When we save gensim word2vec model we get typically following files -
outfilename, outfilename.syn1neg, outfilename.syn0.np, outfilename.syn1.np
Which one maps to ".h5" you mentioned above or word2vec_100_dim.embeddings you uploaded ?
Also couldn't see "word_embeddings.py" where you might have written something related to this.
from keras-language-modeling.
syn0
is the equivalent of the Keras embedding layer I believe, that's what I've been using. It's really these lines:
weights = np.load('word2vec_100_dim.embeddings')
language_model = model.prediction_model.layers[2]
language_model.layers[2].set_weights([weights])
from keras-language-modeling.
@codekansas Yes, I did have the insurance_qa_python
repo cloned and had all the data_paths set properly.
Thanks for adding those .h5
entries. I'll take a look shortly and let you know if everything's working for me.
from keras-language-modeling.
Hi, do you mean outfilename.syn0.np = word2vec_100_dim.embeddings?
from keras-language-modeling.
It might be different depending on your version
from keras-language-modeling.
Related Issues (20)
- Exception: Layer lambda_1 does not support masking, but was passed an input_mask: Elemwise{neq,no_inplace}.0 HOT 2
- _pickle.UnpicklingError: the STRING opcode argument must be quoted HOT 1
- Complaint about no shape when using models saved from Genism
- The incorporation of attention in attention_lstm.py
- incorrect predicted output shape
- train ConvolutionModel model,it seems failed HOT 1
- how to train it in an incremental way?
- TypeError: 'NoneType' object is not iterable HOT 2
- Sigmoid in AttentionLSTM
- Sample example code in your blog not working and giving TypeError: Cannot convert Type TensorType? HOT 5
- Trainable weights in AttentionLSTMWrapper
- Training loss and validation loss are too low HOT 2
- Example script for AttentionLSTM HOT 2
- How can I get attention weight from attention model?
- What is the configuration for the results in results.notes?
- Keras 2 compatibility HOT 1
- What is single_attention_param? HOT 1
- Blog is unavialable HOT 1
- Not able to replicate results with Embedding + maxpooling
- Blog post not opening
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 keras-language-modeling.