mirror of
https://github.com/open-compass/opencompass.git
synced 2025-05-30 16:03:24 +08:00
12 lines
366 B
Python
12 lines
366 B
Python
from .speech_projector import EncoderProjectorConcat
|
|
|
|
|
|
def build_speech_projector(config):
|
|
projector_type = getattr(config, 'speech_projector_type', 'linear')
|
|
if projector_type == 'linear':
|
|
return EncoderProjectorConcat(config)
|
|
elif projector_type == 'none':
|
|
return None
|
|
|
|
raise ValueError(f'Unknown projector type: {projector_type}')
|