cyberzhg / keras-pos-embd Goto Github PK
View Code? Open in Web Editor NEWPosition embedding layers in Keras
Home Page: https://pypi.org/project/keras-pos-embd/
License: MIT License
Position embedding layers in Keras
Home Page: https://pypi.org/project/keras-pos-embd/
License: MIT License
add模式下,多个不同维度的输入,共用一个PositionEmbedding时,将会报错。因为相加时,PositionEmbedding的维度不可能既满足第一个输入的加法,又满足第二个输入的加法。
或许133行可以改为
inputs + pos_embeddings[:,:,:output_dim]
或者
把129行第二个self去掉
但改129行应该会影响其他模式
小白飘过,看大神怎么改法
Any idea how to fix it? there was no any problem during the training process but this error came out when i tried to load the model, thx!
Note that you don't need to enable mask_zero if you would concatenate other layers like word/Char embeddings with masks
Can you please explain this or give a snippet that illustrates what you mean.... for example, what if I want to user vanilla Keras embedding layer
@CyberZHG
Hi CyberZHG,
I want to use this position embedding in an existing model. Can I add this as a layer to the existing model? Another doubt is how to give the relative postions vector to this embedding model.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.