Giter VIP home page Giter VIP logo

Comments (5)

apeterswu avatar apeterswu commented on July 19, 2024

Thanks for your interesting.
Due to some busy stuff, I will respond to you later in detail. In a short: 1.) I will upload a script to convert the model. 2). Yes, the code is an earlier version based on t2t-1.2.9.

from rl4nmt.

belomeriem avatar belomeriem commented on July 19, 2024

Hi,
Thanks for the paper and for the code here, nice work! As a follow-up question to @connectdotz, I couldn't find the code to the RL part, are you planning to upload that part as well (or am I missing something)? Thanks a lot!

from rl4nmt.

apeterswu avatar apeterswu commented on July 19, 2024

@belomeriem @connectdotz Thanks for your interest. Please check the relevance part of https://github.com/apeterswu/RL4NMT/blob/master/tensor2tensor/utils/model_builder.py#L132
This is about the RL model training.

from rl4nmt.

apeterswu avatar apeterswu commented on July 19, 2024

@connectdotz For the data generation, it is same as inference phase, you can check the original t2t code base on how to inference. If you meet problems, please response again. For the last question, you can do the unified training process in an easy way like this: 1. Generate translations for source and target monolingual data as described in the paper, and tarin the MLE model. 2. Use the MLE model to further train the RL part with combined three part data: bilingual data pair, source monolingual data and its translation, back-translated source data of the target monolingual data and the target monolingual data itself.

from rl4nmt.

Kailianghu avatar Kailianghu commented on July 19, 2024

hello, i have run the bash script : bash train_zhen.sh . there has an error
Instructions for updating:
Use tf.estimator.train_and_evaluate.
WARNING:tensorflow:RunConfig.uid (from tensorflow.contrib.learn.python.learn.estimators.run_config) is experimental and may change or be removed at any time, and without warning.
INFO:tensorflow:Creating experiment, storing model files in ./model/zhen_wmt17_transformer_rl_delta_setting
INFO:tensorflow:Loading and processing source vocabulary from: vocab.src
Traceback (most recent call last):
File "./tensor2tensor/bin/t2t-trainer", line 96, in
tf.app.run()
File "/Users/dwing/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "./tensor2tensor/bin/t2t-trainer", line 92, in main
schedule=FLAGS.schedule)
File "/Users/dwing/Downloads/RL4NMT-master/tensor2tensor/utils/trainer_utils.py", line 393, in run
hparams=hparams)
File "/Users/dwing/anaconda3/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 324, in new_func
return func(*args, **kwargs)
File "/Users/dwing/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/learn/python/learn/learn_runner.py", line 208, in run
experiment = wrapped_experiment_fn(run_config=run_config, hparams=hparams)
File "/Users/dwing/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/learn/python/learn/learn_runner.py", line 85, in wrapped_experiment_fn
experiment = experiment_fn(run_config, hparams)
File "/Users/dwing/Downloads/RL4NMT-master/tensor2tensor/utils/trainer_utils.py", line 145, in experiment_fn
run_config=run_config)
File "/Users/dwing/Downloads/RL4NMT-master/tensor2tensor/utils/trainer_utils.py", line 157, in create_experiment
run_config=run_config) # input_fns: input_function
File "/Users/dwing/Downloads/RL4NMT-master/tensor2tensor/utils/trainer_utils.py", line 220, in create_experiment_components
add_problem_hparams(hparams, FLAGS.problems)
File "/Users/dwing/Downloads/RL4NMT-master/tensor2tensor/utils/trainer_utils.py", line 284, in add_problem_hparams
p_hparams = problem.get_hparams(hparams) # contains vocabulary, inputs/targets modality
File "/Users/dwing/Downloads/RL4NMT-master/tensor2tensor/data_generators/problem.py", line 293, in get_hparams
self.get_feature_encoders(data_dir) # vocabulary
File "/Users/dwing/Downloads/RL4NMT-master/tensor2tensor/data_generators/problem.py", line 283, in get_feature_encoders
self._encoders = self.feature_encoders(data_dir)
File "./zhen_wmt17/zhen_wmt17.py", line 142, in feature_encoders
with open(os.path.join(data_dir,_ZHEN_VOCAB_FILES[0]), 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: '../transformer_data/zhen/vocab.src'

i want to ask how to generation data and where is. transformer_data directory

from rl4nmt.

Related Issues (6)

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.