Giter Site home page Giter Site logo

Comments (9)

yangheng95 avatar yangheng95 commented on May 15, 2024

Hello, The source of the domain-adapted BERT model in this repository has been declared in the README.md,
'>>> pretrained_bert_name: bert_pretrained_models/restaurant refers to the path of the pretrained_bert model.
Besides, there is no domain-adapted BERT model for the Twitter dataset temporarily. Although it is improper to use the domain-adapted BERT of the restaurant on Twitter datasets, it still promoted the effect of the Twitter dataset. It also suggests that domain-adapted strategy is effective.

from pyabsa.

GW-S avatar GW-S commented on May 15, 2024

sorry,this is my fault, very sorry and pleasure your reply.
I want replicate your paper for LCF_CDW, but I cant achieve the acc in your paper in twitter dataset.
translate:
你好,我在复现你的算法LCF_CDW效果,但是我发现,在twitter数据集上,我的效果总是差了两个点,无法做到复现,本来是在pytorch_ABSA找到你的论文的,pytorch_ABSA建议我来这里查看最新的代码,但你的代码同样无法到达论文上的效果,你能否开源一下你的参数呢?我目前的参数和你log里面的一样。是我做错了什么吗?

from pyabsa.

yangheng95 avatar yangheng95 commented on May 15, 2024

你好,可以分享一下你的训练日志吗?

from pyabsa.

GW-S avatar GW-S commented on May 15, 2024

当然可以,谢谢你帮我看问题所在。

python train_origion.py --model lcf_bert --da
taset twitter --SRD 5 --local_context_focus cdw --use_single_bert False
loading file https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-uncased-vo
cab.txt from cache at /home/guowei/.cache/torch/pytorch_transformers/26bc1ad6c0ac742e
9b52263248f6d0f00068293b33709fae12320c0e35ccfbbb.542ce4285a40d23a559526243235df47c5f7
5c197f04f37d1a0c124c32c9a084
loading configuration file https://s3.amazonaws.com/models.huggingface.co/bert/bert-b
ase-uncased-config.json from cache at /home/guowei/.cache/torch/pytorch_transformers/
4dad0251492946e18ac39290fcfe91b89d370fee250efe9521476438fe8ca185.bf3b9ea126d8c0001ee8
a1e8b92229871d06d36d8808208cc2449280da87785c
Model config {
  "attention_probs_dropout_prob": 0.1,
  "finetuning_task": null,
  "hidden_act": "gelu",
  "hidden_dropout_prob": 0.1,
  "hidden_size": 768,
  "initializer_range": 0.02,
  "intermediate_size": 3072,
  "layer_norm_eps": 1e-12,
  "max_position_embeddings": 512,
  "num_attention_heads": 12,
  "num_hidden_layers": 12,
  "num_labels": 2,
  "output_attentions": false,
  "output_hidden_states": false,                                           [517/1368]
  "pruned_heads": {},
  "torchscript": false,
  "type_vocab_size": 2,
  "vocab_size": 30522
}

loading weights file https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-un
cased-pytorch_model.bin from cache at /home/guowei/.cache/torch/pytorch_transformers/
aa1ef1aede4482d0dbcd4d52baad8ae300e60902e88fcb0bebdec09afd232066.36ca03ab34a1a5d5fa7b
c3d03d55c4fa650fed07220e2eeebc06ce58d0e9a157
buliding word indices...
buliding word indices...
cuda memory allocated:899384832
n_trainable_params: 224279811, n_nontrainable_params: 0
>>> model_name: lcf_bert
>>> dataset: twitter
>>> use_single_bert: True
>>> optimizer: <class 'torch.optim.adam.Adam'>
>>> initializer: <function xavier_uniform_ at 0x7ff554c78440>
>>> learning_rate: 2e-05
>>> dropout: 0
>>> l2reg: 1e-05
>>> num_epoch: 10
>>> batch_size: 16
>>> log_step: 5
>>> logdir: log
>>> embed_dim: 300
>>> hidden_dim: 300
>>> bert_dim: 768
>>> pretrained_bert_name: bert-base-uncased
>>> max_seq_len: 80
>>> polarities_dim: 3
>>> hops: 3
>>> device: cuda:0
>>> SRD: 5
>>> local_context_focus: cdw
>>> seed: 0
>>> model_class: <class 'models.lcf_bert.LCF_BERT'>
>>> dataset_file: {'train': './datasets/acl-14-short-data/train.raw', 'test': './data
sets/acl-14-short-data/test.raw'}
>>> inputs_cols: ['text_bert_indices', 'bert_segments_ids', 'text_raw_bert_indices', 
'aspect_bert_indices']
repeat: 0
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
epoch: 0
>> saved: state_dict/lcf_bert_twitter_acc39.6
max_acc:39.6  f1:30.32
loss: 1.1132, acc: 25.00, test_acc: 39.60, f1: 30.32
>> saved: state_dict/lcf_bert_twitter_acc50.0
max_acc:50.0  f1:22.22
loss: 1.0808, acc: 40.62, test_acc: 50.00, f1: 22.22
loss: 1.1628, acc: 39.58, test_acc: 45.81, f1: 34.35
loss: 0.9112, acc: 45.31, test_acc: 50.00, f1: 23.31
loss: 0.9610, acc: 47.50, test_acc: 50.00, f1: 22.22
loss: 1.0613, acc: 44.79, test_acc: 29.19, f1: 21.14
>> saved: state_dict/lcf_bert_twitter_acc50.14
max_acc:50.14  f1:24.32
loss: 1.2510, acc: 42.86, test_acc: 50.14, f1: 24.32
>> saved: state_dict/lcf_bert_twitter_acc52.31
max_acc:52.31  f1:33.59
loss: 0.9275, acc: 46.88, test_acc: 52.31, f1: 33.59
>> saved: state_dict/lcf_bert_twitter_acc55.06
max_acc:55.06  f1:37.91
loss: 1.3819, acc: 43.06, test_acc: 55.06, f1: 37.91
loss: 1.2384, acc: 41.88, test_acc: 31.21, f1: 26.38
loss: 0.9814, acc: 42.61, test_acc: 51.88, f1: 27.72
>> saved: state_dict/lcf_bert_twitter_acc56.07
max_acc:56.07  f1:45.0                                                     [448/1368]
loss: 0.9200, acc: 44.27, test_acc: 56.07, f1: 45.00
>> saved: state_dict/lcf_bert_twitter_acc64.45
max_acc:64.45  f1:61.46
loss: 0.8849, acc: 45.67, test_acc: 64.45, f1: 61.46
loss: 0.9880, acc: 45.54, test_acc: 64.16, f1: 61.75
loss: 0.9026, acc: 45.00, test_acc: 63.58, f1: 61.73
>> saved: state_dict/lcf_bert_twitter_acc64.6
max_acc:64.6  f1:63.44
loss: 0.9706, acc: 45.31, test_acc: 64.60, f1: 63.44
>> saved: state_dict/lcf_bert_twitter_acc65.61
max_acc:65.61  f1:64.23
loss: 0.7609, acc: 46.32, test_acc: 65.61, f1: 64.23
>> saved: state_dict/lcf_bert_twitter_acc66.33
max_acc:66.33  f1:61.43
loss: 0.7880, acc: 47.22, test_acc: 66.33, f1: 61.43
loss: 0.8119, acc: 47.70, test_acc: 61.13, f1: 61.78
loss: 1.0041, acc: 47.81, test_acc: 61.27, f1: 50.47
loss: 0.9856, acc: 48.21, test_acc: 63.01, f1: 56.36
loss: 0.6447, acc: 49.72, test_acc: 57.51, f1: 58.17
loss: 0.9442, acc: 49.46, test_acc: 63.87, f1: 64.11
loss: 0.7748, acc: 50.00, test_acc: 61.42, f1: 52.24
>> saved: state_dict/lcf_bert_twitter_acc66.47
max_acc:66.47  f1:63.26
loss: 0.8203, acc: 50.50, test_acc: 66.47, f1: 63.26
>> saved: state_dict/lcf_bert_twitter_acc67.49
max_acc:67.49  f1:66.83
loss: 0.6359, acc: 51.68, test_acc: 67.49, f1: 66.83
>> saved: state_dict/lcf_bert_twitter_acc68.35
max_acc:68.35  f1:67.6
loss: 0.6064, acc: 52.08, test_acc: 68.35, f1: 67.60
loss: 0.7636, acc: 52.68, test_acc: 68.35, f1: 67.71
>> saved: state_dict/lcf_bert_twitter_acc69.08
max_acc:69.08  f1:68.31
loss: 1.1365, acc: 52.59, test_acc: 69.08, f1: 68.31
>> saved: state_dict/lcf_bert_twitter_acc71.1
max_acc:71.1  f1:69.46
loss: 0.9131, acc: 52.71, test_acc: 71.10, f1: 69.46
loss: 0.6468, acc: 53.43, test_acc: 70.66, f1: 69.67
loss: 0.7606, acc: 53.71, test_acc: 69.94, f1: 69.33
loss: 0.6770, acc: 54.36, test_acc: 69.80, f1: 67.29
loss: 0.8943, acc: 54.60, test_acc: 69.80, f1: 69.22
loss: 0.6513, acc: 54.82, test_acc: 67.34, f1: 63.57
loss: 0.7911, acc: 55.21, test_acc: 70.52, f1: 68.65
loss: 0.7194, acc: 55.74, test_acc: 68.93, f1: 68.02
loss: 0.5430, acc: 56.25, test_acc: 69.80, f1: 68.79
loss: 0.5164, acc: 57.05, test_acc: 67.20, f1: 62.25
loss: 0.9239, acc: 56.88, test_acc: 67.63, f1: 68.15
loss: 0.9873, acc: 56.86, test_acc: 58.53, f1: 58.78

loss: 0.5803, acc: 57.29, test_acc: 69.08, f1: 64.84
loss: 0.6657, acc: 57.56, test_acc: 63.87, f1: 55.00
loss: 0.5709, acc: 58.10, test_acc: 70.52, f1: 69.44
loss: 0.5532, acc: 58.61, test_acc: 68.64, f1: 67.89
loss: 0.3485, acc: 59.38, test_acc: 71.10, f1: 66.55
>> saved: state_dict/lcf_bert_twitter_acc71.53
max_acc:71.53  f1:68.91
loss: 1.1093, acc: 59.04, test_acc: 71.53, f1: 68.91
loss: 1.1283, acc: 59.11, test_acc: 61.27, f1: 61.67
>> saved: state_dict/lcf_bert_twitter_acc72.54
max_acc:72.54  f1:71.82
loss: 0.8655, acc: 59.31, test_acc: 72.54, f1: 71.82
loss: 0.6726, acc: 59.38, test_acc: 72.25, f1: 69.37
loss: 0.7825, acc: 59.56, test_acc: 70.66, f1: 69.29
>> saved: state_dict/lcf_bert_twitter_acc73.41
max_acc:73.41  f1:71.59
loss: 0.6925, acc: 59.62, test_acc: 73.41, f1: 71.59
loss: 0.3700, acc: 60.26, test_acc: 68.79, f1: 64.78
loss: 0.6269, acc: 60.30, test_acc: 73.27, f1: 72.18
loss: 0.7946, acc: 60.23, test_acc: 71.97, f1: 70.93
>> saved: state_dict/lcf_bert_twitter_acc73.55
max_acc:73.55  f1:72.45
loss: 0.4129, acc: 60.83, test_acc: 73.55, f1: 72.45
loss: 0.4080, acc: 61.40, test_acc: 72.83, f1: 71.72                       [376/1368]
loss: 0.6642, acc: 61.53, test_acc: 73.12, f1: 70.47
loss: 0.8742, acc: 61.65, test_acc: 68.50, f1: 65.60
loss: 0.7191, acc: 61.88, test_acc: 70.09, f1: 69.45
loss: 0.5801, acc: 62.09, test_acc: 72.25, f1: 71.04
loss: 0.7070, acc: 62.30, test_acc: 70.38, f1: 69.55
loss: 0.7469, acc: 62.40, test_acc: 72.98, f1: 70.71
loss: 0.3730, acc: 62.79, test_acc: 73.41, f1: 71.53
loss: 0.5648, acc: 62.98, test_acc: 69.80, f1: 69.36
loss: 0.7486, acc: 62.97, test_acc: 68.21, f1: 68.29
loss: 0.5002, acc: 63.15, test_acc: 73.27, f1: 71.92
loss: 0.5055, acc: 63.42, test_acc: 73.55, f1: 71.79
loss: 0.5906, acc: 63.41, test_acc: 71.53, f1: 71.12
loss: 0.6054, acc: 63.48, test_acc: 72.69, f1: 71.54
>> saved: state_dict/lcf_bert_twitter_acc73.99
max_acc:73.99  f1:72.9
loss: 0.4650, acc: 63.64, test_acc: 73.99, f1: 72.90
>> saved: state_dict/lcf_bert_twitter_acc75.0
max_acc:75.0  f1:73.8
loss: 0.9325, acc: 63.54, test_acc: 75.00, f1: 73.80
loss: 0.4624, acc: 63.70, test_acc: 72.98, f1: 69.82
loss: 0.4369, acc: 64.02, test_acc: 69.08, f1: 69.05
loss: 0.5816, acc: 64.25, test_acc: 67.34, f1: 67.42
loss: 0.4397, acc: 64.56, test_acc: 72.54, f1: 70.57
loss: 0.6913, acc: 64.61, test_acc: 73.55, f1: 71.48
loss: 0.5357, acc: 64.74, test_acc: 73.41, f1: 71.46
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
epoch: 1
loss: 0.7141, acc: 56.25, test_acc: 71.24, f1: 70.00
loss: 0.6289, acc: 65.62, test_acc: 71.24, f1: 70.71
loss: 0.6197, acc: 68.75, test_acc: 73.12, f1: 72.04
loss: 0.7360, acc: 68.75, test_acc: 73.70, f1: 72.41
loss: 0.5145, acc: 71.25, test_acc: 73.27, f1: 72.42
loss: 0.7008, acc: 69.79, test_acc: 74.71, f1: 73.51
loss: 0.2293, acc: 73.21, test_acc: 73.70, f1: 72.95
loss: 0.2742, acc: 75.00, test_acc: 74.71, f1: 74.07
loss: 0.4962, acc: 75.69, test_acc: 75.00, f1: 74.06
loss: 0.6275, acc: 76.25, test_acc: 73.41, f1: 72.73
loss: 0.4157, acc: 77.27, test_acc: 71.97, f1: 70.90
loss: 0.3272, acc: 78.65, test_acc: 72.98, f1: 72.10
loss: 0.4299, acc: 78.85, test_acc: 72.25, f1: 71.50
loss: 0.5880, acc: 78.57, test_acc: 70.52, f1: 70.13
loss: 0.2709, acc: 79.58, test_acc: 69.94, f1: 69.44
loss: 0.4815, acc: 79.30, test_acc: 73.99, f1: 71.73
>> saved: state_dict/lcf_bert_twitter_acc75.29
max_acc:75.29  f1:74.06
loss: 0.6384, acc: 78.31, test_acc: 75.29, f1: 74.06
loss: 0.4092, acc: 77.78, test_acc: 73.27, f1: 72.33
loss: 0.5391, acc: 78.29, test_acc: 74.57, f1: 73.21
>> saved: state_dict/lcf_bert_twitter_acc75.58
max_acc:75.58  f1:73.64
loss: 0.8110, acc: 78.75, test_acc: 75.58, f1: 73.64
loss: 0.2625, acc: 79.46, test_acc: 73.70, f1: 72.37
loss: 0.2835, acc: 80.11, test_acc: 72.25, f1: 71.67
loss: 0.2504, acc: 80.71, test_acc: 70.81, f1: 70.86
loss: 0.1538, acc: 81.51, test_acc: 74.42, f1: 73.18
loss: 0.8998, acc: 80.50, test_acc: 74.42, f1: 71.83
loss: 0.3148, acc: 81.01, test_acc: 73.84, f1: 73.10
loss: 0.5898, acc: 80.56, test_acc: 70.95, f1: 70.88
loss: 0.2756, acc: 81.03, test_acc: 70.81, f1: 70.40
loss: 0.3043, acc: 81.47, test_acc: 73.99, f1: 72.28
loss: 0.7266, acc: 81.25, test_acc: 70.52, f1: 70.09
loss: 0.4270, acc: 81.25, test_acc: 71.10, f1: 70.94
loss: 0.5939, acc: 81.05, test_acc: 72.40, f1: 71.29
loss: 0.7493, acc: 80.30, test_acc: 72.54, f1: 70.65
loss: 0.3755, acc: 80.51, test_acc: 72.11, f1: 70.81
loss: 0.5793, acc: 80.36, test_acc: 72.69, f1: 71.49
loss: 0.4441, acc: 80.38, test_acc: 70.95, f1: 70.37
loss: 0.7315, acc: 79.93, test_acc: 71.39, f1: 70.97                     loss: 0.5183, acc: 78.52, test_acc: 70.23, f1: 69.70
loss: 0.7562, acc: 78.27, test_acc: 73.84, f1: 72.73
loss: 0.5182, acc: 78.22, test_acc: 73.12, f1: 71.47
loss: 0.6653, acc: 78.17, test_acc: 74.28, f1: 71.90
loss: 0.5629, acc: 78.12, test_acc: 73.70, f1: 72.66
loss: 0.5163, acc: 78.17, test_acc: 73.41, f1: 72.48
loss: 0.3436, acc: 78.21, test_acc: 74.13, f1: 73.50
loss: 0.2560, acc: 78.43, test_acc: 74.71, f1: 74.03
loss: 1.0157, acc: 78.12, test_acc: 73.12, f1: 71.95
loss: 0.4993, acc: 78.00, test_acc: 71.97, f1: 69.58
loss: 0.9734, acc: 77.70, test_acc: 72.25, f1: 67.79
loss: 0.6405, acc: 77.50, test_acc: 73.27, f1: 72.43
loss: 0.6817, acc: 77.38, test_acc: 63.73, f1: 64.27
loss: 0.7390, acc: 77.19, test_acc: 73.99, f1: 72.73
>> saved: state_dict/lcf_bert_twitter_acc76.3
max_acc:76.3  f1:75.22
loss: 0.8934, acc: 77.00, test_acc: 76.30, f1: 75.22
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
epoch: 2

loss: 0.6402, acc: 79.65, test_acc: 73.27, f1: 71.43
loss: 0.4186, acc: 79.69, test_acc: 73.70, f1: 72.29
loss: 0.9441, acc: 79.42, test_acc: 67.77, f1: 68.11
loss: 0.4002, acc: 79.46, test_acc: 73.27, f1: 71.96
loss: 0.6693, acc: 79.51, test_acc: 73.41, f1: 71.10
loss: 0.4072, acc: 79.69, test_acc: 73.12, f1: 72.69
loss: 0.4495, acc: 79.72, test_acc: 73.41, f1: 73.23
loss: 0.3754, acc: 79.62, test_acc: 72.69, f1: 72.17
loss: 0.3568, acc: 79.79, test_acc: 71.68, f1: 71.51
loss: 0.8662, acc: 79.43, test_acc: 72.40, f1: 71.34
loss: 0.7522, acc: 78.83, test_acc: 72.98, f1: 71.43
loss: 0.3497, acc: 78.88, test_acc: 72.40, f1: 71.06
loss: 0.1880, acc: 79.17, test_acc: 71.39, f1: 70.42
loss: 0.6335, acc: 79.09, test_acc: 73.12, f1: 71.44
loss: 0.2937, acc: 79.25, test_acc: 71.53, f1: 68.10
loss: 0.3088, acc: 79.40, test_acc: 72.11, f1: 71.44
loss: 0.6145, acc: 79.32, test_acc: 70.95, f1: 70.18
loss: 0.3087, acc: 79.46, test_acc: 73.84, f1: 72.19
loss: 0.7933, acc: 79.28, test_acc: 73.27, f1: 71.68
loss: 0.3303, acc: 79.42, test_acc: 72.25, f1: 71.00
loss: 0.4839, acc: 79.45, test_acc: 71.39, f1: 70.94
loss: 1.1046, acc: 78.96, test_acc: 71.10, f1: 70.40
loss: 0.7947, acc: 78.69, test_acc: 74.42, f1: 72.59
loss: 0.3220, acc: 78.73, test_acc: 72.98, f1: 71.64
loss: 0.8281, acc: 78.57, test_acc: 73.99, f1: 72.90
epoch: 2
loss: 0.2341, acc: 100.00, test_acc: 71.24, f1: 71.58
loss: 0.2995, acc: 93.75, test_acc: 74.57, f1: 73.78
loss: 0.2039, acc: 93.75, test_acc: 75.72, f1: 73.86
loss: 0.3679, acc: 92.19, test_acc: 73.41, f1: 72.59
loss: 0.3116, acc: 90.00, test_acc: 70.23, f1: 70.43
loss: 0.3346, acc: 89.58, test_acc: 73.84, f1: 73.10
loss: 0.4280, acc: 89.29, test_acc: 74.42, f1: 71.65
loss: 0.1498, acc: 90.62, test_acc: 76.30, f1: 74.66
loss: 0.0544, acc: 91.67, test_acc: 72.98, f1: 72.69
loss: 0.1549, acc: 92.50, test_acc: 72.98, f1: 72.56
loss: 0.4188, acc: 92.05, test_acc: 74.28, f1: 73.73
loss: 0.1327, acc: 91.67, test_acc: 74.57, f1: 73.44
loss: 0.1482, acc: 92.31, test_acc: 75.72, f1: 74.43
loss: 0.5970, acc: 91.52, test_acc: 74.13, f1: 72.74
loss: 0.2975, acc: 91.25, test_acc: 72.83, f1: 72.58
loss: 0.4428, acc: 90.62, test_acc: 71.10, f1: 70.16
loss: 0.2489, acc: 90.44, test_acc: 71.10, f1: 69.78
……

在这之后,就没有任何提升了,锁死在了max_acc:76.3 f1:75.22,我想要的是更高的点。
paper上是77.31 和 75.78

from pyabsa.

yangheng95 avatar yangheng95 commented on May 15, 2024

从日志来看,>> use_single_bert: True, 如果使用双BERT不要在shell或者cmd中指定 --use_single_bert参数。

如果不是这个问题,可以再联系我。

from pyabsa.

yangheng95 avatar yangheng95 commented on May 15, 2024

另外,使用 BERT-ADA存储库中提供的 joint domain-adapted BERT可以在Twitter数据集上取得78.3+的acc(使用LCF-net模型,该模型已经被我废弃),你可以使用批量训练脚本多测试几次,一般3-5次就可以达到最有效果。

from pyabsa.

GW-S avatar GW-S commented on May 15, 2024

非常感谢你的回答。确实是shell的指定有问题,附上原因一份:https://cloud.tencent.com/developer/ask/188470

但在更正了代码后,依然达不到paper的效果。下面附上训练日志:
我学习过你的工作,但我目前更需要的是LCF-net模型。我想用它做baseline.
我多跑几次LCF-net有可能达到77.31 吗?
在这里,我发现并不能到达76.01,只能到达
max_acc:76.01 f1:75.0

Connected to pydev debugger (build 192.6817.19)
loading file https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-uncased-vocab.txt from cache at /home/guowei/.cache/torch/pytorch_transformers/26bc1ad6c0ac742e9b52263248f6d0f00068293b33709fae12320c0e35ccfbbb.542ce4285a40d23a559526243235df47c5f75c197f04f37d1a0c124c32c9a084
loading configuration file https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-uncased-config.json from cache at /home/guowei/.cache/torch/pytorch_transformers/4dad0251492946e18ac39290fcfe91b89d370fee250efe9521476438fe8ca185.bf3b9ea126d8c0001ee8a1e8b92229871d06d36d8808208cc2449280da87785c
Model config {
  "attention_probs_dropout_prob": 0.1,
  "finetuning_task": null,
  "hidden_act": "gelu",
  "hidden_dropout_prob": 0.1,
  "hidden_size": 768,
  "initializer_range": 0.02,
  "intermediate_size": 3072,
  "layer_norm_eps": 1e-12,
  "max_position_embeddings": 512,
  "num_attention_heads": 12,
  "num_hidden_layers": 12,
  "num_labels": 2,
  "output_attentions": false,
  "output_hidden_states": false,
  "pruned_heads": {},
  "torchscript": false,
  "type_vocab_size": 2,
  "vocab_size": 30522
}

loading weights file https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-uncased-pytorch_model.bin from cache at /home/guowei/.cache/torch/pytorch_transformers/aa1ef1aede4482d0dbcd4d52baad8ae300e60902e88fcb0bebdec09afd232066.36ca03ab34a1a5d5fa7bc3d03d55c4fa650fed07220e2eeebc06ce58d0e9a157
buliding word indices...
buliding word indices...
cuda memory allocated:460323328
n_trainable_params: 114797571, n_nontrainable_params: 0
>>> model_name: lcf_bert
>>> dataset: twitter
>>> use_single_bert: False
>>> optimizer: <class 'torch.optim.adam.Adam'>
>>> initializer: <function xavier_uniform_ at 0x7fb42d7cdcb0>
>>> learning_rate: 2e-05
>>> dropout: 0
>>> l2reg: 1e-05
>>> num_epoch: 10
>>> batch_size: 16
>>> log_step: 5
>>> logdir: log
>>> embed_dim: 300
>>> hidden_dim: 300
>>> bert_dim: 768
>>> pretrained_bert_name: bert-base-uncased
>>> max_seq_len: 80
>>> polarities_dim: 3
>>> hops: 3
>>> device: cuda:0
>>> SRD: 5
>>> local_context_focus: cdw
>>> seed: 0
>>> model_class: <class 'models.lcf_bert.LCF_BERT'>
>>> dataset_file: {'train': './datasets/acl-14-short-data/train.raw', 'test': './datasets/acl-14-short-data/test.raw'}
>>> inputs_cols: ['text_bert_indices', 'bert_segments_ids', 'text_raw_bert_indices', 'aspect_bert_indices']
repeat: 0
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
epoch: 0
>> saved: state_dict/lcf_bert_twitter_acc38.87
max_acc:38.87  f1:33.01
loss: 1.1294, acc: 31.25, test_acc: 38.87, f1: 33.01
>> saved: state_dict/lcf_bert_twitter_acc50.0
max_acc:50.0  f1:22.22
loss: 1.0527, acc: 43.75, test_acc: 50.00, f1: 22.22
loss: 1.2335, acc: 39.58, test_acc: 33.82, f1: 24.94
>> saved: state_dict/lcf_bert_twitter_acc50.43
max_acc:50.43  f1:31.36
loss: 0.9272, acc: 45.31, test_acc: 50.43, f1: 31.36
loss: 0.9184, acc: 47.50, test_acc: 50.00, f1: 22.22
loss: 1.0411, acc: 46.88, test_acc: 39.60, f1: 34.48
loss: 1.1918, acc: 44.64, test_acc: 50.14, f1: 22.98
loss: 0.9006, acc: 48.44, test_acc: 49.86, f1: 22.89
>> saved: state_dict/lcf_bert_twitter_acc51.16
max_acc:51.16  f1:27.09
loss: 1.4305, acc: 44.44, test_acc: 51.16, f1: 27.09
loss: 1.2890, acc: 41.88, test_acc: 29.62, f1: 23.47
loss: 1.0176, acc: 42.05, test_acc: 51.01, f1: 25.90
>> saved: state_dict/lcf_bert_twitter_acc51.59
max_acc:51.59  f1:28.4
loss: 0.9991, acc: 42.71, test_acc: 51.59, f1: 28.40
>> saved: state_dict/lcf_bert_twitter_acc54.19
max_acc:54.19  f1:47.98
loss: 0.9379, acc: 43.75, test_acc: 54.19, f1: 47.98
>> saved: state_dict/lcf_bert_twitter_acc62.72
max_acc:62.72  f1:58.28
loss: 1.0185, acc: 43.75, test_acc: 62.72, f1: 58.28
>> saved: state_dict/lcf_bert_twitter_acc63.58
max_acc:63.58  f1:60.37
loss: 1.0606, acc: 42.50, test_acc: 63.58, f1: 60.37
loss: 1.0034, acc: 42.58, test_acc: 58.53, f1: 57.07
>> saved: state_dict/lcf_bert_twitter_acc65.46
max_acc:65.46  f1:64.05
loss: 0.7773, acc: 43.38, test_acc: 65.46, f1: 64.05
>> saved: state_dict/lcf_bert_twitter_acc65.75
max_acc:65.75  f1:61.23
loss: 0.8074, acc: 44.79, test_acc: 65.75, f1: 61.23
loss: 0.8654, acc: 45.07, test_acc: 61.42, f1: 62.06
loss: 1.0373, acc: 45.31, test_acc: 59.68, f1: 48.22
loss: 1.0459, acc: 45.83, test_acc: 61.99, f1: 53.79
loss: 0.6160, acc: 47.44, test_acc: 57.23, f1: 57.79
loss: 1.0934, acc: 47.01, test_acc: 59.97, f1: 60.43
loss: 0.7787, acc: 47.66, test_acc: 60.40, f1: 49.64
loss: 0.9395, acc: 48.00, test_acc: 61.42, f1: 52.70
>> saved: state_dict/lcf_bert_twitter_acc68.21
max_acc:68.21  f1:67.11
loss: 0.5781, acc: 49.28, test_acc: 68.21, f1: 67.11
loss: 0.6242, acc: 50.00, test_acc: 64.60, f1: 64.65
loss: 0.7566, acc: 50.45, test_acc: 67.20, f1: 66.52
loss: 1.0797, acc: 50.43, test_acc: 66.91, f1: 65.69
>> saved: state_dict/lcf_bert_twitter_acc68.64
max_acc:68.64  f1:67.16
loss: 0.8860, acc: 50.83, test_acc: 68.64, f1: 67.16
>> saved: state_dict/lcf_bert_twitter_acc70.23
max_acc:70.23  f1:69.22
loss: 0.6935, acc: 51.41, test_acc: 70.23, f1: 69.22
>> saved: state_dict/lcf_bert_twitter_acc70.52
max_acc:70.52  f1:69.95
loss: 0.7358, acc: 51.76, test_acc: 70.52, f1: 69.95
loss: 0.6407, acc: 52.46, test_acc: 70.52, f1: 68.45
loss: 0.9269, acc: 52.76, test_acc: 69.65, f1: 68.88
loss: 0.6938, acc: 53.04, test_acc: 70.23, f1: 67.93
>> saved: state_dict/lcf_bert_twitter_acc70.81
max_acc:70.81  f1:69.09
loss: 0.8065, acc: 53.47, test_acc: 70.81, f1: 69.09
loss: 0.6493, acc: 53.89, test_acc: 69.22, f1: 68.35
loss: 0.5466, acc: 54.44, test_acc: 69.51, f1: 68.88
loss: 0.5303, acc: 55.29, test_acc: 68.06, f1: 63.39
loss: 1.0354, acc: 55.31, test_acc: 66.18, f1: 66.43
loss: 1.0094, acc: 55.34, test_acc: 58.67, f1: 58.97
loss: 0.5986, acc: 55.80, test_acc: 70.81, f1: 67.57
loss: 0.6553, acc: 56.10, test_acc: 64.02, f1: 54.84
loss: 0.5917, acc: 56.53, test_acc: 70.81, f1: 69.23
loss: 0.5726, acc: 57.08, test_acc: 65.75, f1: 65.33
>> saved: state_dict/lcf_bert_twitter_acc71.24
max_acc:71.24  f1:67.75
loss: 0.4036, acc: 57.74, test_acc: 71.24, f1: 67.75
loss: 1.1178, acc: 57.45, test_acc: 71.24, f1: 68.18
loss: 0.9942, acc: 57.55, test_acc: 65.32, f1: 65.73
loss: 0.8457, acc: 57.91, test_acc: 70.95, f1: 70.54
>> saved: state_dict/lcf_bert_twitter_acc72.69
max_acc:72.69  f1:70.03
loss: 0.5775, acc: 58.13, test_acc: 72.69, f1: 70.03
loss: 0.8614, acc: 58.09, test_acc: 72.11, f1: 70.41
>> saved: state_dict/lcf_bert_twitter_acc73.12
max_acc:73.12  f1:71.25
loss: 0.7606, acc: 58.17, test_acc: 73.12, f1: 71.25
loss: 0.3754, acc: 58.84, test_acc: 68.79, f1: 65.96
loss: 0.6412, acc: 59.03, test_acc: 71.53, f1: 70.78
loss: 0.7898, acc: 58.98, test_acc: 70.81, f1: 69.79
loss: 0.3988, acc: 59.49, test_acc: 71.10, f1: 70.33
loss: 0.4509, acc: 59.87, test_acc: 72.25, f1: 71.57
loss: 0.7131, acc: 60.02, test_acc: 71.53, f1: 68.26
loss: 0.8944, acc: 60.17, test_acc: 69.22, f1: 66.73
loss: 0.7934, acc: 60.21, test_acc: 69.51, f1: 69.40
loss: 0.6160, acc: 60.45, test_acc: 69.65, f1: 69.00
loss: 0.7407, acc: 60.69, test_acc: 71.68, f1: 70.81
loss: 0.8167, acc: 60.62, test_acc: 72.83, f1: 70.90
>> saved: state_dict/lcf_bert_twitter_acc73.27
max_acc:73.27  f1:71.51
loss: 0.3836, acc: 61.04, test_acc: 73.27, f1: 71.51
loss: 0.5396, acc: 61.15, test_acc: 71.39, f1: 71.01
loss: 0.6916, acc: 61.36, test_acc: 69.08, f1: 69.35
loss: 0.4858, acc: 61.57, test_acc: 71.24, f1: 70.63
loss: 0.5002, acc: 61.86, test_acc: 73.27, f1: 72.06
loss: 0.6359, acc: 61.96, test_acc: 71.97, f1: 71.63
loss: 0.6780, acc: 62.05, test_acc: 70.38, f1: 69.46
loss: 0.5857, acc: 62.15, test_acc: 72.83, f1: 72.22
loss: 0.8923, acc: 62.15, test_acc: 72.40, f1: 70.83
loss: 0.4828, acc: 62.33, test_acc: 72.25, f1: 68.91
loss: 0.4415, acc: 62.67, test_acc: 70.23, f1: 70.20
loss: 0.6961, acc: 62.75, test_acc: 67.49, f1: 67.83
loss: 0.4913, acc: 62.99, test_acc: 71.97, f1: 70.73
loss: 0.7849, acc: 63.07, test_acc: 72.11, f1: 70.34
>> saved: state_dict/lcf_bert_twitter_acc74.13
max_acc:74.13  f1:72.24
loss: 0.4733, acc: 63.30, test_acc: 74.13, f1: 72.24
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
epoch: 1
loss: 0.6860, acc: 68.75, test_acc: 70.81, f1: 69.79
loss: 0.5215, acc: 71.88, test_acc: 69.80, f1: 69.59
loss: 0.5985, acc: 72.92, test_acc: 73.41, f1: 72.48
loss: 0.7888, acc: 71.88, test_acc: 73.84, f1: 72.46
loss: 0.4609, acc: 75.00, test_acc: 72.69, f1: 71.92
loss: 0.7100, acc: 71.88, test_acc: 73.70, f1: 72.75
loss: 0.3592, acc: 74.11, test_acc: 73.99, f1: 72.85
>> saved: state_dict/lcf_bert_twitter_acc74.28
max_acc:74.28  f1:73.34
loss: 0.3165, acc: 75.78, test_acc: 74.28, f1: 73.34
>> saved: state_dict/lcf_bert_twitter_acc74.71
max_acc:74.71  f1:73.88
loss: 0.5813, acc: 76.39, test_acc: 74.71, f1: 73.88
loss: 0.4443, acc: 76.88, test_acc: 72.40, f1: 71.68
loss: 0.4941, acc: 76.70, test_acc: 71.68, f1: 70.79
loss: 0.3539, acc: 77.60, test_acc: 71.24, f1: 70.66
loss: 0.4632, acc: 78.85, test_acc: 70.81, f1: 69.96
loss: 0.6262, acc: 78.57, test_acc: 70.09, f1: 69.95
loss: 0.2542, acc: 79.58, test_acc: 70.23, f1: 69.81
loss: 0.3913, acc: 79.30, test_acc: 72.54, f1: 70.54
loss: 0.5982, acc: 78.68, test_acc: 73.84, f1: 72.72
loss: 0.3621, acc: 79.51, test_acc: 73.70, f1: 72.67
loss: 0.5364, acc: 79.93, test_acc: 73.84, f1: 72.41
loss: 0.7760, acc: 80.31, test_acc: 74.13, f1: 72.51
loss: 0.3169, acc: 80.95, test_acc: 73.12, f1: 71.79
loss: 0.2542, acc: 81.53, test_acc: 71.97, f1: 71.56
loss: 0.2333, acc: 82.34, test_acc: 69.80, f1: 70.16
loss: 0.1336, acc: 83.07, test_acc: 73.41, f1: 72.23
loss: 0.8266, acc: 82.50, test_acc: 73.41, f1: 70.88
loss: 0.4177, acc: 82.69, test_acc: 74.28, f1: 73.35
loss: 0.6460, acc: 82.41, test_acc: 71.68, f1: 71.72
loss: 0.3099, acc: 82.37, test_acc: 70.66, f1: 70.52
loss: 0.3345, acc: 82.76, test_acc: 72.98, f1: 70.86
loss: 0.7222, acc: 82.08, test_acc: 71.10, f1: 70.29
loss: 0.4822, acc: 82.06, test_acc: 68.35, f1: 68.58
loss: 0.6252, acc: 81.84, test_acc: 70.23, f1: 69.72
loss: 0.6993, acc: 81.44, test_acc: 71.82, f1: 70.17
loss: 0.3050, acc: 81.62, test_acc: 71.97, f1: 70.33
loss: 0.6134, acc: 81.43, test_acc: 71.24, f1: 70.17
loss: 0.4724, acc: 81.42, test_acc: 69.22, f1: 69.07
loss: 0.5436, acc: 81.25, test_acc: 72.40, f1: 71.73
loss: 0.6210, acc: 80.92, test_acc: 72.25, f1: 71.42
loss: 0.7656, acc: 80.61, test_acc: 73.41, f1: 71.20
loss: 0.3810, acc: 80.94, test_acc: 73.55, f1: 72.25
loss: 0.9794, acc: 80.03, test_acc: 68.35, f1: 68.83
loss: 0.5680, acc: 79.76, test_acc: 74.57, f1: 73.33
loss: 0.6080, acc: 79.80, test_acc: 73.70, f1: 71.63
loss: 0.3772, acc: 80.11, test_acc: 73.55, f1: 72.81
loss: 0.5277, acc: 80.00, test_acc: 71.68, f1: 71.32
loss: 0.3649, acc: 80.03, test_acc: 73.41, f1: 72.57
loss: 0.3105, acc: 80.32, test_acc: 72.11, f1: 71.73
loss: 0.8958, acc: 79.82, test_acc: 72.25, f1: 71.67
loss: 0.6748, acc: 79.34, test_acc: 73.70, f1: 72.60
>> saved: state_dict/lcf_bert_twitter_acc74.86
max_acc:74.86  f1:73.3
loss: 0.3980, acc: 79.38, test_acc: 74.86, f1: 73.30
loss: 0.2582, acc: 79.66, test_acc: 71.68, f1: 70.58
loss: 0.6500, acc: 79.57, test_acc: 74.13, f1: 72.68
loss: 0.2657, acc: 79.72, test_acc: 74.57, f1: 72.62
loss: 0.3575, acc: 79.75, test_acc: 72.25, f1: 71.28
loss: 0.4716, acc: 79.77, test_acc: 71.97, f1: 71.09
loss: 0.2711, acc: 79.91, test_acc: 72.83, f1: 71.79
loss: 0.9306, acc: 79.71, test_acc: 74.42, f1: 73.19
loss: 0.3409, acc: 79.85, test_acc: 71.82, f1: 69.81
loss: 0.7026, acc: 79.66, test_acc: 71.10, f1: 70.73
loss: 1.2473, acc: 78.96, test_acc: 70.52, f1: 69.90
loss: 0.6735, acc: 78.89, test_acc: 74.71, f1: 72.78
loss: 0.3350, acc: 79.03, test_acc: 72.69, f1: 70.96
loss: 0.7195, acc: 79.07, test_acc: 73.27, f1: 72.28
loss: 0.5589, acc: 78.91, test_acc: 69.08, f1: 68.60
loss: 0.6324, acc: 78.65, test_acc: 73.84, f1: 72.76
loss: 0.4494, acc: 78.79, test_acc: 73.12, f1: 71.35
loss: 0.6808, acc: 78.82, test_acc: 73.55, f1: 71.58
loss: 0.5765, acc: 78.68, test_acc: 74.13, f1: 73.18
loss: 0.5336, acc: 78.71, test_acc: 74.28, f1: 73.37
>> saved: state_dict/lcf_bert_twitter_acc75.0
max_acc:75.0  f1:74.12
loss: 0.4067, acc: 78.66, test_acc: 75.00, f1: 74.12
>> saved: state_dict/lcf_bert_twitter_acc76.01
max_acc:76.01  f1:75.0
loss: 0.1632, acc: 78.96, test_acc: 76.01, f1: 75.00
loss: 0.9298, acc: 78.65, test_acc: 75.58, f1: 74.10
loss: 0.4981, acc: 78.60, test_acc: 72.98, f1: 71.30
loss: 0.9244, acc: 78.38, test_acc: 74.28, f1: 70.93
loss: 0.6246, acc: 78.33, test_acc: 72.11, f1: 71.65
loss: 0.7035, acc: 78.21, test_acc: 64.88, f1: 65.32
loss: 0.7599, acc: 78.08, test_acc: 75.43, f1: 73.99
loss: 0.7689, acc: 77.96, test_acc: 75.29, f1: 74.08
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
epoch: 2
loss: 0.2959, acc: 81.25, test_acc: 69.94, f1: 69.99
loss: 0.2067, acc: 87.50, test_acc: 74.86, f1: 73.76
loss: 0.2465, acc: 85.42, test_acc: 73.99, f1: 71.94
loss: 0.2784, acc: 84.38, test_acc: 72.25, f1: 71.56
loss: 0.2783, acc: 83.75, test_acc: 68.64, f1: 69.04
loss: 0.3539, acc: 84.38, test_acc: 74.57, f1: 73.74
loss: 0.4411, acc: 84.82, test_acc: 74.13, f1: 71.23
loss: 0.1300, acc: 86.72, test_acc: 75.00, f1: 73.11
loss: 0.0417, acc: 88.19, test_acc: 73.41, f1: 72.87
loss: 0.1799, acc: 89.38, test_acc: 71.53, f1: 71.21
loss: 0.4058, acc: 88.64, test_acc: 72.69, f1: 72.43
loss: 0.1381, acc: 88.54, test_acc: 73.70, f1: 72.24
loss: 0.1941, acc: 88.94, test_acc: 75.87, f1: 74.53
loss: 0.5223, acc: 88.84, test_acc: 74.42, f1: 73.62
loss: 0.5237, acc: 88.33, test_acc: 71.68, f1: 71.29
loss: 0.5171, acc: 87.89, test_acc: 73.27, f1: 72.09
loss: 0.1226, acc: 88.24, test_acc: 72.40, f1: 70.55
loss: 0.0863, acc: 88.89, test_acc: 74.71, f1: 73.38
loss: 0.1048, acc: 89.47, test_acc: 70.95, f1: 70.15
loss: 0.1990, acc: 89.69, test_acc: 72.25, f1: 71.42
loss: 0.2076, acc: 89.58, test_acc: 72.69, f1: 71.99
loss: 0.3905, acc: 89.49, test_acc: 72.11, f1: 71.69
loss: 0.0445, acc: 89.95, test_acc: 74.71, f1: 73.43
loss: 0.6704, acc: 89.32, test_acc: 73.12, f1: 71.44
loss: 0.2248, acc: 89.25, test_acc: 72.98, f1: 71.99
loss: 0.5371, acc: 88.94, test_acc: 72.25, f1: 71.00
loss: 0.0903, acc: 89.35, test_acc: 73.12, f1: 71.71
loss: 0.9005, acc: 88.39, test_acc: 73.27, f1: 71.79
loss: 0.0625, acc: 88.79, test_acc: 69.65, f1: 69.44
loss: 0.3638, acc: 88.54, test_acc: 71.24, f1: 70.90
loss: 0.2272, acc: 88.51, test_acc: 74.13, f1: 72.57
loss: 0.2477, acc: 88.28, test_acc: 73.12, f1: 71.81
loss: 0.3131, acc: 88.07, test_acc: 72.11, f1: 71.16
loss: 0.0597, acc: 88.42, test_acc: 72.98, f1: 71.93
loss: 0.1874, acc: 88.57, test_acc: 72.98, f1: 71.54
loss: 0.4661, acc: 88.54, test_acc: 71.82, f1: 70.61
loss: 0.1998, acc: 88.51, test_acc: 72.83, f1: 71.81
loss: 0.1136, acc: 88.82, test_acc: 71.68, f1: 70.79
loss: 0.4590, acc: 88.62, test_acc: 73.12, f1: 71.97
loss: 0.3665, acc: 88.59, test_acc: 73.41, f1: 72.17
loss: 0.2075, acc: 88.72, test_acc: 73.41, f1: 71.31
loss: 0.4536, acc: 88.69, test_acc: 72.54, f1: 71.80
loss: 0.5304, acc: 88.52, test_acc: 69.08, f1: 68.99
loss: 0.2907, acc: 88.49, test_acc: 74.86, f1: 73.17
loss: 0.1863, acc: 88.61, test_acc: 74.57, f1: 72.82
loss: 0.3135, acc: 88.72, test_acc: 71.97, f1: 71.33
loss: 0.4544, acc: 88.70, test_acc: 72.98, f1: 72.10
loss: 0.1210, acc: 88.80, test_acc: 73.27, f1: 72.04
loss: 0.2125, acc: 88.90, test_acc: 72.83, f1: 71.82
loss: 0.1881, acc: 88.88, test_acc: 73.27, f1: 72.49
loss: 0.2224, acc: 88.97, test_acc: 71.10, f1: 70.73
loss: 0.2191, acc: 89.06, test_acc: 72.25, f1: 71.18
loss: 0.2054, acc: 89.03, test_acc: 72.83, f1: 72.13
loss: 0.1373, acc: 89.12, test_acc: 67.77, f1: 68.22
loss: 0.1516, acc: 89.32, test_acc: 74.86, f1: 73.76
loss: 0.5088, acc: 88.95, test_acc: 75.29, f1: 73.54
loss: 0.0808, acc: 89.14, test_acc: 72.40, f1: 71.44
loss: 0.2669, acc: 89.12, test_acc: 69.08, f1: 69.22
loss: 0.2314, acc: 89.09, test_acc: 72.11, f1: 71.29
loss: 0.4600, acc: 88.96, test_acc: 72.25, f1: 71.30
loss: 0.5116, acc: 88.63, test_acc: 67.05, f1: 67.34
loss: 0.3113, acc: 88.61, test_acc: 71.24, f1: 70.58
loss: 0.1154, acc: 88.79, test_acc: 73.27, f1: 70.98
loss: 0.2804, acc: 88.77, test_acc: 72.11, f1: 70.93
loss: 0.4939, acc: 88.75, test_acc: 67.20, f1: 67.53
loss: 0.2218, acc: 88.83, test_acc: 71.97, f1: 70.95
loss: 0.3981, acc: 88.81, test_acc: 70.95, f1: 69.03
loss: 0.3945, acc: 88.88, test_acc: 73.12, f1: 71.26
loss: 0.4265, acc: 88.95, test_acc: 71.82, f1: 70.96
loss: 0.1416, acc: 89.02, test_acc: 68.79, f1: 68.89
loss: 0.1667, acc: 89.08, test_acc: 68.79, f1: 68.70
loss: 0.4121, acc: 88.89, test_acc: 72.25, f1: 70.80
loss: 0.1959, acc: 88.96, test_acc: 72.98, f1: 71.53
loss: 0.1752, acc: 89.02, test_acc: 72.98, f1: 71.89
loss: 0.1685, acc: 89.08, test_acc: 72.40, f1: 70.47
loss: 0.1862, acc: 89.14, test_acc: 73.12, f1: 71.58
loss: 0.2158, acc: 89.20, test_acc: 73.41, f1: 72.16
loss: 0.1661, acc: 89.26, test_acc: 72.11, f1: 71.21
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
epoch: 3
loss: 0.1063, acc: 100.00, test_acc: 73.27, f1: 72.05
loss: 0.1451, acc: 96.88, test_acc: 73.55, f1: 72.48
loss: 0.0321, acc: 97.92, test_acc: 75.00, f1: 73.36
loss: 0.0359, acc: 98.44, test_acc: 74.42, f1: 72.91
loss: 0.0318, acc: 98.75, test_acc: 72.40, f1: 71.53
loss: 0.0709, acc: 98.96, test_acc: 70.23, f1: 69.88
loss: 0.1079, acc: 98.21, test_acc: 72.25, f1: 71.49
loss: 0.0232, acc: 98.44, test_acc: 73.99, f1: 72.69
loss: 0.1055, acc: 97.92, test_acc: 72.40, f1: 71.31
loss: 0.1725, acc: 97.50, test_acc: 71.68, f1: 70.78
loss: 0.0603, acc: 97.73, test_acc: 72.40, f1: 71.05
loss: 0.1308, acc: 97.40, test_acc: 71.10, f1: 70.10
loss: 0.1031, acc: 97.12, test_acc: 69.08, f1: 68.73
loss: 0.0673, acc: 96.88, test_acc: 68.93, f1: 68.55
loss: 0.0708, acc: 96.67, test_acc: 70.52, f1: 69.70
loss: 0.0358, acc: 96.88, test_acc: 68.50, f1: 68.25
loss: 0.0440, acc: 97.06, test_acc: 68.79, f1: 68.59
loss: 0.1031, acc: 96.88, test_acc: 71.24, f1: 70.00
loss: 0.1103, acc: 96.71, test_acc: 72.83, f1: 71.19
loss: 0.1945, acc: 96.25, test_acc: 70.52, f1: 70.04
loss: 0.2209, acc: 95.83, test_acc: 66.47, f1: 66.78
loss: 0.0516, acc: 96.02, test_acc: 69.08, f1: 69.04
loss: 0.0189, acc: 96.20, test_acc: 73.27, f1: 72.09
loss: 0.0397, acc: 96.35, test_acc: 74.13, f1: 72.73
loss: 0.0289, acc: 96.50, test_acc: 72.25, f1: 71.62
loss: 0.4887, acc: 96.39, test_acc: 71.97, f1: 71.53
loss: 0.3034, acc: 96.30, test_acc: 73.55, f1: 72.42
loss: 0.1648, acc: 96.21, test_acc: 73.99, f1: 72.69
loss: 0.4545, acc: 95.69, test_acc: 73.27, f1: 72.50
loss: 0.0617, acc: 95.83, test_acc: 73.27, f1: 72.18
loss: 0.1190, acc: 95.77, test_acc: 72.98, f1: 71.33
loss: 0.1232, acc: 95.90, test_acc: 73.70, f1: 71.57
loss: 0.1294, acc: 95.64, test_acc: 75.14, f1: 73.66
loss: 0.1456, acc: 95.59, test_acc: 74.86, f1: 73.59
loss: 0.1271, acc: 95.54, test_acc: 72.83, f1: 71.85
loss: 0.5609, acc: 95.31, test_acc: 72.83, f1: 72.08
loss: 0.0407, acc: 95.44, test_acc: 74.71, f1: 73.23
loss: 0.1011, acc: 95.56, test_acc: 74.57, f1: 73.44
loss: 0.0388, acc: 95.67, test_acc: 73.55, f1: 72.65
loss: 0.0651, acc: 95.78, test_acc: 71.68, f1: 70.84
loss: 0.1750, acc: 95.73, test_acc: 72.11, f1: 71.21
loss: 0.1018, acc: 95.68, test_acc: 72.11, f1: 71.30
loss: 0.0653, acc: 95.64, test_acc: 71.10, f1: 70.29
loss: 0.2731, acc: 95.60, test_acc: 71.68, f1: 70.08
loss: 0.0146, acc: 95.69, test_acc: 72.83, f1: 71.87
loss: 0.1265, acc: 95.65, test_acc: 71.10, f1: 70.39
后面无增长

from pyabsa.

yangheng95 avatar yangheng95 commented on May 15, 2024

你好,抱歉回复晚了。这几天才有时间测试代码,发现现在模型确实很难在twitter上达到77+的acc了(最高76.88),推测是代码重构和迁移到pytorh-transfomers库导致的,你可以使用自己实际得出的结果而不是paper上的结果。后面如果有时间我会再检查问题并更新repo,LCF-net模型确实可以在几个数据集上达到比较好的成绩,但是存在暂时无法解决的问题,所以暂时不会开源该模型。

from pyabsa.

GW-S avatar GW-S commented on May 15, 2024

非常感谢你的回答。我觉得你做出了了不起的工作。谢谢你。

from pyabsa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.