GithubHelp home page GithubHelp logo

jacoxu / encoder_decoder Goto Github PK

View Code? Open in Web Editor NEW
277.0 23.0 127.0 290 KB

Four styles of encoder decoder model by Python, Theano, Keras and Seq2Seq

Home Page: https://github.com/jacoxu/encoder_decoder

Python 100.00%
encoder-decoder seq2seq attention encoder-decoder-modes

encoder_decoder's People

Contributors

jacoxu avatar stephenhky avatar zake7749 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

encoder_decoder's Issues

run encoder_decoder.py error

when I run

python encoder_decoder.py
I got this error:
Using TensorFlow backend.
Traceback (most recent call last):
File "encoder_decoder.py", line 9, in
from seq2seq.layers.decoders import LSTMDecoder, LSTMDecoder2, AttentionDecoder
ImportError: No module named layers.decoders
It seems something about seq2seq,but I have installed it.
pip list | grep seq2seq
seq2seq (0.1.0)
Does anyone has encountered this problem?

question about the initial_state of decoder

Hi, I am wonder that how to initialize the state of the encoder and decoder. I tried both encoder_states and [a1, b1] to initialize the state of the decoder_lstm2 but got bad result. I can get good results when I use only decoder_lstm1 with one or several encoders which without initialize the state. Could you please help me? Here is my code.

encoder_inputs = Input(shape=(max_video_length, 4096), dtype='float32')
encoder = LSTM(latent_dim, return_state=True)
encoder_outputs, state_h, state_c = encoder(encoder_outputs2)
encoder_states = [state_h, state_c]

decoder_inputs = Input(shape=(None, len(char_list)), name="decoder_inputs")
decoder_lstm1 = LSTM(latent_dim, return_sequences=True, return_state=True, name="decoder_lstm1")
decoder_lstm2 = LSTM(latent_dim, return_sequences=True, return_state=True, name="decoder_lstm2")
decoder_dense = Dense(len(char_list), activation='softmax')

decoder_outputs, a1, b1 = decoder_lstm1(decoder_inputs, initial_state=encoder_states)
decoder_outputs, a2, b2 = decoder_lstm2(decoder_outputs, initial_state=encoder_states)
decoder_outputs = decoder_dense(decoder_outputs)

model = Model([encoder_inputs, decoder_inputs], decoder_outputs)

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.