File size: 343 Bytes
a1f442d
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
from transformers import PretrainedConfig

class ResnetFeatureExtractorConfig(PretrainedConfig):
    model_type = "resnet"

    def __init__(self, name = 'resnet152', **kwargs):
        if name != 'resnet152':
            raise ValueError(f"`name` must be 'resnet152', got {name}.")

        self.name = name
        super().__init__(**kwargs)