Coder Social home page Coder Social logo

sentiment-analysis-keras-conv's People

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sentiment-analysis-keras-conv's Issues

Error during "model.compile()"

Hi! First of all, thanks for sharing this keras nn!

I was trying to run this code as is and I got this error right after running the model.compile(). Would you know what is it?

TypeError: sigmoid_cross_entropy_with_logits() got an unexpected keyword argument 'labels'_

Full Error Transcription:

`### In [21]: model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])

TypeError Traceback (most recent call last)
in ()
----> 1 model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])

//anaconda/lib/python2.7/site-packages/keras/models.pyc in compile(self, optimizer, loss, metrics, sample_weight_mode, **kwargs)
764 metrics=metrics,
765 sample_weight_mode=sample_weight_mode,
--> 766 **kwargs)
767 self.optimizer = self.model.optimizer
768 self.loss = self.model.loss

//anaconda/lib/python2.7/site-packages/keras/engine/training.pyc in compile(self, optimizer, loss, metrics, loss_weights, sample_weight_mode, **kwargs)
897 loss_weight = loss_weights_list[i]
898 output_loss = weighted_loss(y_true, y_pred,
--> 899 sample_weight, mask)
900 if len(self.outputs) > 1:
901 self.metrics_tensors.append(output_loss)

//anaconda/lib/python2.7/site-packages/keras/engine/training.pyc in weighted(y_true, y_pred, weights, mask)
428 """
429 # score_array has ndim >= 2
--> 430 score_array = fn(y_true, y_pred)
431 if mask is not None:
432 # Cast the mask to floatX to avoid float64 upcasting in theano

//anaconda/lib/python2.7/site-packages/keras/losses.pyc in binary_crossentropy(y_true, y_pred)
43
44 def binary_crossentropy(y_true, y_pred):
---> 45 return K.mean(K.binary_crossentropy(y_pred, y_true), axis=-1)
46
47

//anaconda/lib/python2.7/site-packages/keras/backend/tensorflow_backend.pyc in binary_crossentropy(output, target, from_logits)
2615
2616 return tf.nn.sigmoid_cross_entropy_with_logits(labels=target,
-> 2617 logits=output)
2618
2619

TypeError: sigmoid_cross_entropy_with_logits() got an unexpected keyword argument 'labels'
`

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.