Skip to content

A lightweight yet powerful audio-to-MIDI converter with pitch bend detection

Comment out dead code in models.py (#180)

Pierre Tharyad83963bbb75
diff --git a/basic_pitch/models.py b/basic_pitch/models.py
index 61bd66a..867d9b3 100644
--- a/basic_pitch/models.py
+++ b/basic_pitch/models.py
@@ -223,17 +223,20 @@ def model(
N_FREQ_BINS_CONTOURS,
)(x)
- # contour layers - fully convolutional
- x_contours = tfkl.Conv2D(
- n_filters_contour,
- CONTOUR_KERNEL_SIZE_1,
- padding="same",
- kernel_initializer=_initializer(),
- kernel_constraint=_kernel_constraint(),
- )(x)
-
- x_contours = tfkl.BatchNormalization()(x_contours)
- x_contours = tfkl.ReLU()(x_contours)
+ # contour layers - fully convolutional - /!\ commented out as it was unintentionally skipped
+ # when training the model presented in the paper.
+ # TODO: retrain with layer included and replace checkpoints if it yields benefits
+ #
+ # x_contours = tfkl.Conv2D(
+ # n_filters_contour,
+ # CONTOUR_KERNEL_SIZE_1,
+ # padding="same",
+ # kernel_initializer=_initializer(),
+ # kernel_constraint=_kernel_constraint(),
+ # )(x)
+
+ # x_contours = tfkl.BatchNormalization()(x_contours)
+ # x_contours = tfkl.ReLU()(x_contours)
x_contours = tfkl.Conv2D(
CONTOUR_FILTERS_2,