Coder Social home page Coder Social logo

as's Introduction

ASR

This is a repository for ASR homework with implementation of Conformer model and some experiments with it. Also that repository can be used as a template for other projects.

Getting Started

These instructions will help you to run a project on your machine.

Prerequisites

Install poetry following the instructions in the official repository.

Installation

Clone the repository into your local folder:

cd <path/to/local/folder>
git clone https://github.com/toobrainless/dla_template -b asr

Setup requirements with poetry

cd <path/to/cloned/ASR/project>
poetry install

Now you can use poetry run to use environment. For example, poetry run python3 train.py, for more usability read poetry documentation.

Setup heavy stuff

poetry run python3 setup_lm_model.py
poetry run python3 setup_conformer.py

Training

To train model run with default config:

poetry run python3 train.py

To resume training from checkpoint

poetry run python3 train.py resume=path\to\saved\checkpoint.pth

To change config parameters use the following approach:

poetry run python3 train.py param1=value1 param2=value2

For example, to change batch size and number of epochs:

poetry run python3 train.py data.train.batch_size=32 trainer.epochs=10

The train config is stored in configs/train.yaml, it contains path to the datasets, model, optimizer, scheduler, trainer and other parameters. Also you can change it manually or create your own config file.

Testing

To evaluate model run the following script:

poetry run python3 test.py

The test config is stored in configs/test.yaml, it contains path to the checkpoint, datasets and metrics for evaluation. To change config parameters use the same approach as for training.

as's People

Contributors

toobrainless avatar

Watchers

 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.