Comments (3)
Hi @Jonida88!
Check your numpy version but it might be the case that for some reasons it does not understand the shape given as a list, change it to a tuple like (len(vocab), dim) instead of [len(vocab), dim].
Or check that len(vocab) and dim are integers.
from sequence_tagging.
Hi @guillaumegenthial glad that you was answering me i was able to solve it but now i have an other issue i am runing the build_data without error so this mean:
> Building vocab...
-done.33970tokens
Building vocab...
-done.400000 tokens
Writing vocab..
-done.7398 tokens
Writing vocab..
-done.28227 tokens
Writing vocab..
-done.85 tokens
but when i open the file I have this issue:
> Error! C:\Users\admin\ML\data\glove.6B.300d.trimmed.npz is not UTF-8 encoded
> Saving disabled.
> See Console for more details.
the code
`np.savez_compressed(filename_trimmed, embeddings=embeddings)
def get_trimmed_glove_vectors(filename_trimmed):
try:
with np.load(filename_trimmed) as data:
return data["embeddings"]
except IOError:
raise MyIOError(filename_trimmed)`
any idea... thanks for your help...
from sequence_tagging.
I also had this issue. I upgraded my Tensorflow to 2.0.0 and numpy to 1.16.4.
For your new problem, consider saving your glove embedding as a UTF-8 txt file. Opening it in this format doesn't give issues.
I hope this helps.
from sequence_tagging.
Related Issues (20)
- recipe for target 'run' failed HOT 4
- Unicode Decode Error HOT 2
- Prediction shows I-LOC without B-LOC HOT 2
- how to shuffle batches with the iterator? HOT 1
- The loss depends on the max length of sequence in a batch, which should not be the case. HOT 1
- Extraction of specific expressions HOT 2
- Char Embedding Error HOT 2
- Huge error on prediction (NER) HOT 1
- how to get the input and output nodes of the model HOT 1
- How to get or create 'data/glove.6B/glove.6B.300d.txt'? HOT 6
- How to improve precision by this model?
- Not mentioned <start>、<end> token
- How to evaluate the precision, recall and F1-value of the code?
- KeyError: 'O' makefile:7: recipe for target 'run' failed HOT 1
- what is the difference between self.word_embeddings with tf.nn.dropout and without it
- Saving the model weights in TF 2
- F1 score of all custom named entity
- How can I get eng.testa.iob?
- Why use training, validation and test set to build vocabulary in build_data.py ? Isn't it information leak ?
- Code snippet for tensorflow 2.x
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 sequence_tagging.