|
|
@ -131,8 +131,7 @@ def get_subsample(config):
|
|
|
|
int: subsample rate.
|
|
|
|
int: subsample rate.
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
if config['encoder'] == 'squeezeformer':
|
|
|
|
if config['encoder'] == 'squeezeformer':
|
|
|
|
input_layer = config["encoder_conf"]["time_reduction_layer_type"]
|
|
|
|
return 4
|
|
|
|
assert input_layer in ["conv2d", "conv1d", "stream"]
|
|
|
|
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
input_layer = config["encoder_conf"]["input_layer"]
|
|
|
|
input_layer = config["encoder_conf"]["input_layer"]
|
|
|
|
assert input_layer in ["conv2d", "conv2d6", "conv2d8"]
|
|
|
|
assert input_layer in ["conv2d", "conv2d6", "conv2d8"]
|
|
|
@ -142,7 +141,3 @@ def get_subsample(config):
|
|
|
|
return 6
|
|
|
|
return 6
|
|
|
|
elif input_layer == "conv2d8":
|
|
|
|
elif input_layer == "conv2d8":
|
|
|
|
return 8
|
|
|
|
return 8
|
|
|
|
elif input_layer == "conv1d":
|
|
|
|
|
|
|
|
return 6
|
|
|
|
|
|
|
|
elif input_layer == "stream":
|
|
|
|
|
|
|
|
return 8
|
|
|
|
|
|
|
|