Code Monkey home page Code Monkey logo

sentiment_analysis_imdb's Introduction

Sentiment_Analysis_Imdb

Introduction

I use the bert、roberta totally 2 different pre-trained models and using the gru、lstm、bilstm、textcnn、rnn、fnn totally 6 network to run. on the imdb datasets. Whitch is so useful for the fresh man.

Dataset

The dataset.csv file is the imdb dataset, which has already been processed. The detailed processing can be found in the following article : DataPreProcessing

In addition to that, I've also covered the process of experimentation in detail on my blog, which you can take a look at if you're interested Experimenttation process CSDN_IMDB_Sentiment_Analysis

Network

The network structure is as follows

Github版 IMDB

Result

Since IMDB data volume is very large, we use 10% of the data volume for training. The results are as follows

Snipaste_2022-11-21_16-04-03

Requirement

  • Python = 3.9
  • torch = 1.11.0
  • numpy = 1.22.3
  • transformers=4.19.2

Preparation

Clone

git clone https://github.com/BeiCunNan/sentiment_analysis_Imdb.git

Create an anaconda environment

conda create -n sai python=3.9
conda activate sai
pip install -r requirements.txt

Usage

python main.py --method sai

sentiment_analysis_imdb's People

Contributors

beicunnan 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

Watchers

 avatar  avatar

sentiment_analysis_imdb's Issues

Maybe mistake?

main.py中当method_name == 'lstm_textcnn_attention',model是Transformer_Attention。

Interesting works!

Hi BeiCunNan,

This is an interesting project, but we want to make it run on an M1 chip as well. Do you think you can modify the code and get it running?

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.