GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — nmt/q7_tiny.sh at main · ericjanto/nmt Expand file tree/ Copy pathq7_tiny.shMore file actions executable file ·43 lines (36 loc) · 1.62 KB / Copy pathq7_tiny.shFile metadata and controlsexecutable file ·43 lines (36 loc) · 1.62 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 #!/usr/bin/env bash ########### # USAGE NOTE: # The following script is designed to help you get started running models with the codebase. # At a minimum, all you need to do is give a name do your experiment using the ${EXP_NAME} variable. # Additional arguments can be added to the train.py command for different functionality. # We recommend copying this script and modifying it for each experiment you try (multi-layer, lexical etc) ########### # Activate Conda Environment [assuming your Miniconda installation is in your root directory] source ~/miniconda3/bin/activate nlu # Define a location for all your experiments to save ROOT=$(git rev-parse --show-toplevel) RESULTS_ROOT="${ROOT}/results" mkdir -p ${RESULTS_ROOT} ### NAME YOUR EXPERIMENT HERE ## EXP_NAME="q7-tiny" ################################ ## Local variables for current experiment EXP_ROOT="${RESULTS_ROOT}/${EXP_NAME}" DATA_DIR="${ROOT}/europarl_prepared" TEST_EN_GOLD="${ROOT}/europarl_raw/test.en" TEST_EN_PRED="${EXP_ROOT}/model_translations.txt" mkdir -p ${EXP_ROOT} # Train model. Defaults are used for any argument not specified here. Use "\" to add arguments over multiple lines. python train.py --save-dir "${EXP_ROOT}" \ --log-file "${EXP_ROOT}/log.out" \ --data "${DATA_DIR}" \ --train-on-tiny \ --arch transformer ### ADDITIONAL ARGUMENTS HERE ### ## Prediction step python translate.py \ --checkpoint-path "${EXP_ROOT}/checkpoint_best.pt" \ --output "${TEST_EN_PRED}" ## Calculate BLEU score for model outputs perl multi-bleu.perl -lc ${TEST_EN_GOLD} < ${TEST_EN_PRED} | tee "${EXP_ROOT}/bleu.txt" |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |