Giter Site home page Giter Site logo

keras-pos-embd's Introduction

keras-pos-embd's People

Contributors

cyberzhg 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  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  avatar  avatar  avatar

keras-pos-embd's Issues

维度不一致,相加报错

add模式下,多个不同维度的输入,共用一个PositionEmbedding时,将会报错。因为相加时,PositionEmbedding的维度不可能既满足第一个输入的加法,又满足第二个输入的加法。

或许133行可以改为
inputs + pos_embeddings[:,:,:output_dim]
或者
把129行第二个self去掉
但改129行应该会影响其他模式

小白飘过,看大神怎么改法

Confusion regarding using other embeddings

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

Input to the position embedding model

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.

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.