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

loss为负 #9

Open
wn1652400018 opened this issue Sep 15, 2022 · 0 comments
Open

loss为负 #9

wn1652400018 opened this issue Sep 15, 2022 · 0 comments

Comments

@wn1652400018
Copy link

loss为负是怎么回事?我是用了首页的命令训练:accelerate launch train.py
--model_type bert
--pretrained_model_name_or_path bert-base-chinese
--method gplinker
--logging_steps 200
--num_train_epochs 20
--learning_rate 3e-5
--num_warmup_steps_or_radios 0.1
--gradient_accumulation_steps 1
--per_device_train_batch_size 16
--per_device_eval_batch_size 32
--seed 42
--save_steps 10804
--output_dir ./outputs
--max_length 128
--topk 1
--num_workers 6
数据就是用的demo数据,然后loss到了后面是负的,请问是怎们回事?

You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 837.69it/s]
Training: 8%|████████▋ | 200/2500 [02:19<26:16, 1.46it/s]global_steps 200 - lr: 0.00002400 loss: 134.76951660
Training: 16%|█████████████████▍ | 400/2500 [04:34<21:52, 1.60it/s]global_steps 400 - lr: 0.00002800 loss: 6.22303181
Training: 24%|██████████████████████████▏ | 600/2500 [06:53<20:34, 1.54it/s]global_steps 600 - lr: 0.00002533 loss: 1.68208083
Training: 32%|██████████████████████████████████▉ | 800/2500 [09:11<19:24, 1.46it/s]global_steps 800 - lr: 0.00002267 loss: 0.43898743
Training: 40%|███████████████████████████████████████████▏ | 1000/2500 [11:28<14:13, 1.76it/s]global_steps 1000 - lr: 0.00002000 loss: -0.17771700
Training: 48%|███████████████████████████████████████████████████▊ | 1200/2500 [13:48<15:27, 1.40it/s]global_steps 1200 - lr: 0.00001733 loss: -0.66882968
Training: 56%|████████████████████████████████████████████████████████████▍ | 1400/2500 [16:06<12:03, 1.52it/s]global_steps 1400 - lr: 0.00001467 loss: -0.90139576
Training: 64%|█████████████████████████████████████████████████████████████████████ | 1600/2500 [18:22<09:28, 1.58it/s]global_steps 1600 - lr: 0.00001200 loss: -1.23828728
Training: 72%|█████████████████████████████████████████████████████████████████████████████▊ | 1800/2500 [20:42<07:52, 1.48it/s]global_steps 1800 - lr: 0.00000933 loss: -1.32025996
Training: 80%|██████████████████████████████████████████████████████████████████████████████████████▍ | 2000/2500 [22:58<05:01, 1.66it/s]global_steps 2000 - lr: 0.00000667 loss: -1.46236899
Training: 88%|███████████████████████████████████████████████████████████████████████████████████████████████ | 2200/2500 [25:17<03:05, 1.62it/s]global_steps 2200 - lr: 0.00000400 loss: -1.54635276
Training: 96%|███████████████████████████████████████████████████████████████████████████████████████████████████████▋ | 2400/2500 [27:35<01:06, 1.51it/s]global_steps 2400 - lr: 0.00000133 loss: -1.63138097
Training: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2500/2500 [28:43<00:00, 1.63it/s]

##--------------------- Dev
--------------------------------------------------------------------------------
f1 = 0.7389277389277997
precision = 0.7731707317073724
recall = 0.707589285714351

**--------------------- Dev End

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

1 participant