| 17 | |
| 18 | class SearchSpace: |
| 19 | def __init__(self, config: Dict[str, Any]): |
| 20 | self.config = config |
| 21 | |
| 22 | self.layer_types = ['conv3x3', 'conv5x5', 'conv7x7', 'depthwise', 'bottleneck', 'identity'] |
| 23 | self.activation_types = ['relu', 'gelu', 'silu', 'mish'] |
| 24 | self.pooling_types = ['max', 'avg', 'none'] |
| 25 | self.channels = [32, 64, 128, 256, 512] |
| 26 | |
| 27 | self.num_layers = config.get('num_layers', 20) |
| 28 | self.num_blocks = config.get('num_blocks', 5) |
| 29 | |
| 30 | def random_architecture(self) -> Architecture: |
| 31 | genome = [] |