One approach to denoising a long NMR sequence using wavelet coefficients as input to a CNN-ResNet18 in Python, would be to do the following:
# Define and train the CNN-ResNet18 model
model = tf.keras.Sequential([
tf.keras.layers.InputLayer(input_shape=(X_train.shape[1], 1)),
tf.keras.layers.Conv1D(filters=64, kernel_size=3, padding='same', activation='relu'),
tf.keras.layers.MaxPooling1D(pool_size=2),
tf.keras.layers.Conv1D(filters=128, kernel_size=3, padding='same', activation='relu'),
tf.keras.layers.Conv1D(filters=256, kernel_size=3, padding='same', activation='relu'),
tf.keras.layers.Conv1D(filters=512, kernel_size=3, padding='same', activation='relu'),
tf.keras.layers.Conv1D(filters=1024, kernel_size=3, padding='same', activation='relu'),
tf.keras.layers.UpSampling1D(size=2),
tf.keras.layers.Conv1D(filters=512, kernel_size=3, padding='same', activation='relu'),
tf.keras.layers.Conv1D(filters=256, kernel_size=3, padding='same', activation='relu'),
tf.keras.layers.Conv1D(filters=128, kernel_size=3, padding='same', activation='relu'),
tf.keras.layers.Conv1D(filters=64, kernel_size=3, padding='same', activation='relu'),
tf.keras.layers.Conv1D(filters=1, kernel_size=1, padding='same', activation='linear')
])
model.compile(optimizer='adam', loss='mse')
model.fit(X_train, y_train, validation_data=(X_test, y_test), epochs=10, batch_size=32)