Commit 9b54deb9 authored by Jean Ibarz's avatar Jean Ibarz
Browse files

Added a model that localize a binaural signal into 3 categories (left,center,right).

parent ffdc29ea
......@@ -29,3 +29,27 @@ def default_model_creator(model_config):
])
return model
def left_center_or_right_model_creator(model_config):
"""
input: (batch, time, channels, 1),
output: the guessed azimuth, one-hot encoded in 3 categories (left, center, right)
"""
model = tf.keras.Sequential([
RandomScale2DLayer(minval=model_config['random_scale']['minval'],
maxval=model_config['random_scale']['maxval']),
RandomShift2DLayer(minval=model_config['random_shift']['minval'],
maxval=model_config['random_shift']['maxval'],
axis=1),
tkl.Flatten(),
tkl.Dense(units=10, activation='relu'),
tkl.Dropout(rate=0.2),
tkl.Dense(units=10, activation='relu'),
tkl.Dropout(rate=0.2),
tkl.Dense(units=10, activation='relu'),
tkl.Dropout(rate=0.2),
tkl.Dense(units=3, activation='softmax')
])
return model
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment