Coder Social home page Coder Social logo

sumanismcse / using-lstm-network-for-sentiment-analysis Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 57 KB

Using Long Short Term Memory Model and Recursive Neural Network for Sentiment Analysis to use in the automated therapeutic app as an input to read intent of user in Google's cloud natural language processing service 'dialogflow' and on that basis we provide low cost therapy

Jupyter Notebook 76.21% Python 23.79%
lstm lstm-neural-networks lstm-model sentiment-analysis sentiment-classification sentiment-polarity sentiment-analyser sentiment-classifier python jupyter-notebook

using-lstm-network-for-sentiment-analysis's People

Contributors

sumanismcse avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

jessie37464

using-lstm-network-for-sentiment-analysis's Issues

Convert pytorch model to onnx file and onnx file to tensorflow model for better data serving in the app

### When I tried to convert pytorch model to onnx file,This Happened:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-33-a9d25627b347> in <module>()
     10 # Export the trained model to ONNX
     11 dummy_input = Variable(torch.randn(1, 1, 28, 28)) # one black and white 28 x 28 picture will be the input to the model
---> 12 torch.onnx.export(trained_model, dummy_input, "sentiment.onnx")

9 frames
/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in _slow_forward(self, *input, **kwargs)
    529         tracing_state._traced_module_stack.append(self)
    530         try:
--> 531             result = self.forward(*input, **kwargs)
    532         finally:
    533             tracing_state.pop_scope()

TypeError: forward() missing 1 required positional argument: 'hidden'

###The same happened on the onnx file to tensorflow model:

----------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-34-a405ea78dbb6> in <module>()
      1 
----> 2 import onnx
      3 import warnings
      4 from onnx_tf.backend import prepare
      5 

ModuleNotFoundError: No module named 'onnx'

---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------

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.