Skip to content

How to evaluate a pretrained model? #11

@danyaljj

Description

@danyaljj

@huminghao16
Could you include the scripts for evaluating a pretrained model?
(for example evaluating the large model you have included in the readme.)

I am running this command:

export DATA_DIR=data/drop
export BERT_TRAINED_DIR=out/drop_mtmsn_model
python -m bert.run_mtmsn \
  --vocab_file $BERT_TRAINED_DIR/vocab.txt \
  --bert_config_file $BERT_TRAINED_DIR/bert_config.json \
  --init_checkpoint $BERT_TRAINED_DIR/checkpoint.pth.tar \
  --do_predict \
  --do_lower_case \
  --predict_file $DATA_DIR/drop_dataset_dev.json \
  --predict_batch_size 48 \
  --max_seq_length 512 \
  --span_extraction \
  --addition_subtraction \
  --counting \
  --negation \
  --gradient_accumulation_steps 2 \
  --optimize_on_cpu \
  --output_dir out/drop_mtmsn_model_dev_file

where:

$ ls out/drop_mtmsn_model
bert_config.json  checkpoint.pth.tar  network.txt  parameter.txt  performance.txt  predictions.json  vocab.txt

The output predictions that I see are all random (e.g., many negative numbers).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions