OpenNMT / nmt-wizard-docker

Dockerized NMT frameworks for nmt-wizard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Training a model

julsal opened this issue · comments

Hi,

I'm trying to train. I already generated the vocabulary files and organised the training data in ${CORPUS_DIR}/train . I also provided the following config.json file.

{
    "source": "en",  
    "target": "it",
    "tokenization": {
        "source": {"vocabulary": "${CORPUS_DIR}/vocab/en-vocab.txt"},
        "target": {"vocabulary": "${CORPUS_DIR}/vocab/it-vocab.txt"}
    },
    "options": {
        "mode_type": "Transformer",
        "config": {
            "params": {
                "optimizer": "GradientDescentOptimizer",
                "learning_rate": 1,
                "param_init": 0.1,
                "clip_gradients": 5.0,
                "beam_width": 5
            },
            "train": {
                "batch_size": 64,
                "bucket_width": 2,
                "maximum_features_length": 50,
                "maximum_labels_length": 50,
                "save_checkpoints_steps": 5000,
                "keep_checkpoint_max": 8
            }
        }
    }
}

When I run, the problem is "the model". If I leave it empty. I get the error: probably need to set --model or --model_type.

I added this attribute in the configuration file
"model": "${MODELS_DIR}/unique"
and created a directory named unique in `${MODELS_DIR}.

Now I get the error: No model defined .

How can I solve it?

Hi,

Your configuration uses mode_type instead of of model_type.

Thanks for the quick reply and sorry for my silly mistake. It worked perfectly!