Git Product home page Git Product logo

computerdesign's Introduction

SIU

File structure

├── b站爬虫
│   ├── controller
│   │   ├── **/*.css
│   ├── views
│   ├── model
│   ├── index.js
├── code
│   ├── dataloader.py
│   ├── finetune.py
│   ├── prediction.py
│   ├── test.ipynb
|   ├── utils.py
├── data
├── data_analyze.ipynb
├── 文档
└── README.md

Run the training module

Run the following command in the terminal in one line(add space between each arg), the content in the [bracket] is the customizable parameter to be filled in

conda run -n base --no-capture-output --live-stream python [Directory of the finetune.py file] \
  --device [str: device to use, i.e. 'cuda:0'] \
  --if_local [bool: whether to load existing model from local, **note: the name of the existing model has to be the same with the model_name declared below**] \
  --model_name [str: name of the pre-trained model] \
  --epochs [int: num of epochs] \
  --batch_size [int: batch size] \
  --weight_decay [float: weight decay] \
  --drop_prob [float: dropout probability] \

Run the prediction module

Run the following command to predict the label using costomized dataset. Note: must save your dataset to the /data directory.

conda run -n base --no-capture-output --live-stream python [Directory of the prediction.py file] \
  --model_path [str: path to the model, default: /prediction.py] \
  --dataset_name [str: name of dataset(must be stored in the /data directory)] \
  --device [str: device to use, i.e. 'cuda:0'] \
  --model_name [str: name of the tokenizer model] \

Example

conda run -n base --no-capture-output --live-stream python /Users/zhengyuan/Desktop/ComputerDesign/code/prediction.py --model_path /Users/zhengyuan/Desktop/ComputerDesign/code/model/finetuned_model.pt --dataset_name test --device cuda:0 --model_name bert-base-chinese

computerdesign's People

Contributors

forstant avatar henryliu0820 avatar jdk455 avatar

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.