Spaces:
Runtime error
Runtime error
Update x.py
Browse files93 unmodified lines94959697979899991001011011021031031041051051061071089 unmodified lines11811912012112112212312493 unmodified lines layers.append(nn.LeakyReLU(negative_slope=0.01, inplace=True)) elif activation == 'elu': layers.append(nn.ELU(alpha=1.0, inplace=True)) if dropout := lp.get('dropout', 0.0): if dropout := lp.get('dropout', 0.1): layers.append(nn.Dropout(p=dropout)) if lp.get('memory_augmentation', False): if lp.get('memory_augmentation', True): layers.append(MemoryAugmentationLayer(lp['output_size'])) if lp.get('hybrid_attention', False): if lp.get('hybrid_attention', True): layers.append(HybridAttentionLayer(lp['output_size'])) if lp.get('dynamic_flash_attention', False): if lp.get('dynamic_flash_attention', True): layers.append(DynamicFlashAttentionLayer(lp['output_size'])) if lp.get('magic_state', False): if lp.get('magic_state', True): layers.append(MagicStateLayer(lp['output_size'])) return nn.Sequential(*layers)
9 unmodified lines
def parse_xml_file(file_path): tree, root, layers = ET.parse(file_path), ET.parse(file_path).getroot(), [] for layer in root.findall('.//layer'): for layer in root.findall('.//label'): lp = { 'input_size': int(layer.get('input_size', 128)), 'output_size': int(layer.get('output_size', 256)),x.py+6-6