Git Product home page Git Product logo

keras-han-for-docla's People

Contributors

florishoogenboom 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

Watchers

 avatar  avatar  avatar

keras-han-for-docla's Issues

han_model.predict_sentence_attention(X)

WARNING:tensorflow:
The following Variables were used a Lambda layer's call (lambda_4), but
are not present in its tracked objects:
<tf.Variable 'sentence_attention/W:0' shape=(100, 100) dtype=float32>
<tf.Variable 'sentence_attention/context_vector:0' shape=(100, 1) dtype=float32>
It is possible that this is intended behavior, but it is more likely
an omission. This is a strong indication that this layer should be
formulated as a subclassed Layer rather than a Lambda layer.

predict on example model

Hi, how do I predict with the model?
Tried this but didn't work

print('Test...')
test_data = pd.read_csv('C:/Users/UOU/Desktop/ebifolder/mpm/keras-han-for-docla/trialdata/testData.tsv', sep='\t')
test_data = test_data['review'].values

result = han_model.predict(test_data)

TypeError while running example in imdb_example.py

This is the error I got

TypeError Traceback (most recent call last)
in
132 # Load the embeddings from a file
133 embeddings = {}
--> 134 with open('C:/Users/UOU/Desktop/ebifolder/mpm/keras-han-for-docla/trialdata/glove.6B.100d.txt' % GLOVE_DIM, encoding='utf-8') as file:
135 for line in file:
136 values = line.split()

TypeError: not all arguments converted during string formatting

Any ideas?

what do inputs represent?

Hello and thanks for sharing your code!
I have a question, what do the input layers represent in this model? I think the first input represents the word indexes, so in that case what does input_2 represent? Is it the encoded states of the sentences? In that case shouldn't it be a float?

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.