Advertisement
Guest User

config.yml

a guest
Apr 4th, 2018
509
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 3.76 KB | None | 0 0
  1. # WARNING:
  2. # Do not use this file as is! It only lists and documents available options
  3. # without caring about their consistency.
  4.  
  5. # The directory where models and summaries will be saved. It is created if it does not exist.
  6. model_dir: cond_gru_exp_deep
  7.  
  8. data:
  9.  # (required for train_and_eval and train run types).
  10.   train_features_file: data/train.bpe.50000.en
  11.   train_labels_file: data/train.bpe.50000.it
  12.  
  13.   # (required for train_end_eval and eval run types).
  14.   eval_features_file: data/test.bpe.50000.en
  15.   eval_labels_file: data/test.tok.it
  16.  
  17.   # (optional) Models may require additional resource files (e.g. vocabularies).
  18.   source_words_vocabulary: data/vocab.bpe.50000.en
  19.   target_words_vocabulary: data/vocab.bpe.50000.it
  20.   # source_tokenizer_config: big_deen_exp/tokenizer.yml
  21.   # target_tokenizer_config: big_deen_exp/tokenizer.yml
  22.  
  23. # Model and optimization parameters.
  24. params:
  25.   average_loss_in_time: true
  26.   beam_width: 8
  27.   optimizer: AdamOptimizer
  28.   learning_rate: 0.0001
  29.   clip_gradients: 5.0
  30.   decay_type: exponential_decay
  31.   decay_rate: 0.9
  32.   decay_steps: 20000
  33.   start_decay_steps: 500000
  34.   minimum_learning_rate: 0.00001
  35.   label_smoothing: 0.1
  36.   length_penalty: 0.3
  37.   maximum_iterations: 70
  38.  
  39.  
  40. # Training options.
  41. train:
  42.   batch_size: 100
  43.   # (optional) Batch size is the number of "examples" or "tokens" (default: "examples").
  44.   batch_type: examples
  45.   # (optional) Save a checkpoint every this many steps.
  46.   save_checkpoints_steps: 10000
  47.   # (optional) How many checkpoints to keep on disk.
  48.   keep_checkpoint_max: 30
  49.   # (optional) Save summaries every this many steps.
  50.   save_summary_steps: 200
  51.   # (optional) Train for this many steps. If not set, train forever.
  52.   train_steps: 600000
  53.   # (optional) If true, makes a single pass over the training data (default: false).
  54.   single_pass: false
  55.   # (optional) The maximum length of feature sequences during training (default: None).
  56.   maximum_features_length: 51
  57.   # (optional) The maximum length of label sequences during training (default: None).
  58.   maximum_labels_length: 51
  59.   # (optional) The width of the length buckets to select batch candidates from (default: 5).
  60.   bucket_width: 5
  61.   # (optional) The number of threads to use for processing data in parallel (default: 4).
  62.   num_threads: 4
  63.   # (optional) The number of elements from which to sample during shuffling (default: 500000).
  64.   # Consider setting this to the number of training examples.
  65.   sample_buffer_size: 4547174
  66.   # (optional) The number of batches to prefetch asynchronously (default: 1).
  67.   prefetch_buffer_size: 1
  68.  
  69. # (optional) Evaluation options.
  70. eval:
  71.  # (optional) The batch size to use (default: 32).
  72.   batch_size: 30
  73.   # (optional) The number of threads to use for processing data in parallel (default: 1).
  74.   num_threads: 2
  75.   # (optional) The number of batches to prefetch asynchronously (default: 1).
  76.   prefetch_buffer_size: 1
  77.   # (optional) Evaluate every this many seconds (default: 18000).
  78.   eval_delay: 3000
  79.   # (optional) Save evaluation predictions in model_dir/eval/.
  80.   save_eval_predictions: True
  81.   # (optional) Evalutator or list of evaluators that are called on the saved evaluation predictions.
  82.   # Available evaluators: BLEU, BLEU-detok
  83.   external_evaluators: BLEU
  84.   postprocess_script: /home/deep-babelscape/nmt/OpenNMT-tf/iten_exp_2/postprocess-dev.sh
  85.   save_models: False
  86.  
  87.  
  88.   # (optional) Inference options.
  89. infer:
  90.  # (optional) The batch size to use (default: 1).
  91.   batch_size: 100
  92.   # (optional) The number of threads to use for processing data in parallel (default: 1).
  93.   num_threads: 1
  94.   # (optional) The number of batches to prefetch asynchronously (default: 1).
  95.   prefetch_buffer_size: 1
  96.   # (optional) For compatible models, the number of hypotheses to output (default: 1).
  97.   n_best: 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement