补充num_classes注释说明 (#10073)

ser_vi_layoutxlm_xfund_zh.yml中的Architecture.Backbone.num_classes所赋值会设置给Loss.num_classes,
由于采用BIO标注,假设字典中包含n个字段(包含other)时,则类别数为2n-1;假设字典中包含n个字段(不含other)时,则类别数为2n+1。
pull/10318/head
tanjh 2023-07-05 14:58:00 +08:00 committed by GitHub
parent b8888627a5
commit ebfbb80dcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -205,7 +205,7 @@ Architecture:
name: LayoutXLMForSer
pretrained: True
mode: vi
# 假设字典中包含n个字段包含other由于采用BIO标注则类别数为2n-1
# 由于采用BIO标注假设字典中包含n个字段包含other则类别数为2n-1; 假设字典中包含n个字段不含other则类别数为2n+1。否则在train过程会报IndexError: (OutOfRange) label value should less than the shape of axis dimension 。
num_classes: &num_classes 7
PostProcess: