Skip to content

gokuldhakal16/code_translation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

code_translation

A machine learning approach for sequence to sequence translation of source code.

How to execute:

Seq2seq:

  • Enter tf: source ~/tensorflow/bin/activate
  • Execute code: python translate.py --size=256 --num_layers=3 --steps_per_checkpoint=50 --bleu
  • Or interactive mode (only works when the model has been trained): python translate.py --size=350 --num_layers=3 --step_per_checkpoint=50 --decode

Options

  • add --evaluate to see the score with a trained model on the development file (default False)
  • add --size=XX to change size of LSTM layer to XX (default 256)
  • add --num_layers=XX to change number of LSTM layers to XX (default 2)
  • add --steps_per_checkpoint=XX to change amount of steps per evaluation output to XX(default 200)
  • add --code_vocab_size=XX to change the code vocabulary size to XX (default 3000)
  • add --en_vocab_size=XX to change the English vocabulary size to XX (default 3000)
  • add --lstm=XX to change the LSTM type to normal or attention (default attention)
  • uncomment the 'embedding_rnn_seq2seq' part in seq2seq_model.py to enable the embedded_seq2seq lstm without attention

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published