File size: 339 Bytes
e3bea7e
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from transformers import PretrainedConfig
from typing import List

class RMBGConfig(PretrainedConfig):
    model_type = "SegformerForSemanticSegmentation"
    def __init__(

        self,

        in_ch=3,

        out_ch=1,

        **kwargs):
      self.in_ch = in_ch
      self.out_ch = out_ch
      super().__init__(**kwargs)