Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Result is different... #5

Closed
jdh3577 opened this issue Dec 16, 2019 · 2 comments
Closed

Result is different... #5

jdh3577 opened this issue Dec 16, 2019 · 2 comments

Comments

@jdh3577
Copy link

jdh3577 commented Dec 16, 2019

Thank you for your code.
However, when i run code setting only finetune teacher(BERT-base)

# run simple fune-tuning *teacher* by uncommenting below cmd
    argv = get_predefine_argv('glue', 'RTE', 'finetune_teacher')

In argument_parser.py,

    elif mode == 'glue':
        argv = [
                '--task_name', task_name,
                '--bert_model', 'bert-base-uncased',
                '--max_seq_length', '128',
                '--train_batch_size', '32',
                '--learning_rate', '2e-5',
                '--num_train_epochs', '4',
                '--eval_batch_size', '32',
                '--log_every_step', '1',
                '--output_dir', os.path.join(HOME_DATA_FOLDER, f'outputs/KD/{task_name}/teacher_12layer'),
                '--do_train', 'True',
                '--do_eval', 'True',
                '--fp16', 'True',
            ]
        if train_type == 'finetune_teacher':
            argv += [
                '--student_hidden_layers', '12',
                '--kd_model', 'kd',
                '--do_eval', 'True',
                '--alpha', '0.0',    # alpha = 0 is equivalent to fine-tuning for KD
            ]

Result

12/16/2019 06:48:04 - INFO - __main__ -   ***** Eval results *****
12/16/2019 06:48:04 - INFO - __main__ -     acc = 0.5983333333333334
12/16/2019 06:48:04 - INFO - __main__ -     eval_loss = 1.6177796708776595

what is the reason..?

@jdh3577
Copy link
Author

jdh3577 commented Dec 17, 2019

This is solved!

@jdh3577 jdh3577 closed this as completed Dec 17, 2019
@yg33717
Copy link

yg33717 commented Dec 18, 2019

i got same problem, can you tell me how did you solved?
finetune teacher(BERT-base), acc = 0.5696666666666667

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants