Giter Club home page Giter Club logo

feature-based-dl-classifier's Introduction

Model Description

参加比赛期间设计的基于pytorch的深度学习特征分类器

Configuration: Python 3.6.9, Pytorch 1.7.1

model name: Self-Attention Based Multi-model Fusion Prediction Model.

self-attention mechanism is leveraged to fuse features got by sub-model.

model framework

示意图

train the model command

python fit.py [-parameters]

parameters description:

-data_path 
    path of data used for fitting the model, e.g. ./data/trainingdata.csv
-random_seed
    random seed
-lr
    learning rate, default=0.01
-val_p
    proportion of partition validation set, default=0.2
-batch_size
    how many data batched for training, default=256:
-device
    where to train the model, default='cuda'
-model_num
    number of submodels(MLP\CNN etc. Classifier), default=5
-input_size
    dimention of input featrue (number of column of input_file), default=28
-hidden_size
    hidden state's dimention of linear layer, default=64
-output_size
    whole model's output vector dimention, default=5
-dropout_p
    probability applied by dropout layer, default=0.2
-model_save_dir
    model parameter save dir, default='./model/'
-train_balance
    whether to enhance data, default=True

use model to predict

python predict.py [-parameters]

parameters description:

 -model_path
    model path
 -test_data
    test data path
 -save_dir
    dir of prediction results, default="./data/testing_data/
 -input_size
    dimention of input featrue (number of column of input_file), default=28

the prediction result will be stored in save_dir

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.