Git Product home page Git Product logo

cs6910-assignment-3's Introduction

Machine-Transliteration

This is CS6910 course assignment-3 at IIT Madras. Here you will find detailed information about the assignment. In this assignment, I created a Recurrent Neural Network to transliterate a word from English to Bengali (how we type while chatting with our friends on WhatsApp etc). Different types of cells such as vanilla RNN, LSTM, GRU have been implemented to improve the accuracy of the model. Along with that, an attention network has been added in the model to further increase the accuracy of the model.

The model has been trained by using Aksharantar dataset released by AI4Bharat.

Here is the detailed wandb report for this assignment.

Dependencies

In this assignment, I used these libraies:

import torch
import random
import pandas as pd
import torch.nn as nn
from torch import optim
from torch.utils.data import TensorDataset
from torch.utils.data import DataLoader
from torch.nn.utils.rnn import pad_sequence
import argparse

If you don't have these packages installed then use this command to install:

pip install pytorch
pip install pandas

Supported Command Line Arguments

If you want to train and use this model for your dataset then download the train.py file. Hyperparameters of the model, train and test dataset path can be mentioned using command line arguments. Here are the supported command line arguments:

Argument Short Option Type Default Description
--train_dataset_path -trainPath str aksharantar_sampled/ben/ben_train.csv Path to the training dataset
--validation_dataset_path -vaildPath str aksharantar_sampled/ben/ben_valid.csv Path to the validation dataset
--test_dataset_path -testPath str aksharantar_sampled/ben/ben_test.csv Path to the test dataset
--epochs -ep int 15 Number of epochs
--batch_size -bs int 32 Batch size
--cell_type -ct str LSTM Type of RNN cell (e.g., LSTM, GRU)
--embedding_size -es int 128 Size of the embeddings
--hidden_size -hs int 256 Size of the hidden layers
--encoder_layer -el int 3 Number of encoder layers
--decoder_layer -dl int 3 Number of decoder layers
--dropout -dp float 0.2 Dropout rate
--bidirectional -bd str Yes Use bidirectional RNN (Yes/No)
--attention -atn str Yes Use attention mechanism (Yes/No)

cs6910-assignment-3's People

Contributors

rupak-paul avatar

Watchers

Kostas Georgiou avatar  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.