github上的video swin transformer的num classes在哪个文件夹修改呀
通常在训练的配置文件中设置num_classes
参数,具体位置取决于你使用的训练脚本。在 Video Swin Transformer 中,你可以在 configs/recognition/swin/swin_tiny_patch244_window8_4gpu.yaml
中设置 num_classes
参数,例如:
model:
type: recognizer
backbone:
type: SwinTransformer3D
patch_size: (2, 4, 4)
in_channels: 3
embed_dims: [96, 192, 384, 768]
num_heads: [3, 6, 12, 24]
depths: [2, 2, 6, 2]
window_size: 8
drop_path_rate: 0.3
cls_head:
type: TSNHead
num_classes: 10 # 在这里修改num_classes参数
in_channels: 768
loss:
type: CrossEntropyLoss
你可以打开该文件进行修改,然后按照文档中的训练步骤进行训练。