Skip to content

Conversation

@vl-dud
Copy link
Contributor

@vl-dud vl-dud commented Oct 21, 2024

Switch to the modern TF style, which avoids such warnings:

UserWarning: `tf.layers.dense` is deprecated and will be removed in a future version. Please use `tf.keras.layers.Dense` instead.

@lululxvi
Copy link
Owner

Please see below for the regularizaion:

# tf.layers.dense() is not available for TensorFlow 2.16+ with Keras 3. The

self.regularization_loss += tf.math.add_n(dense.losses)

@vl-dud
Copy link
Contributor Author

vl-dud commented Oct 23, 2024

You are right, the loss of regularization was ignored. I have corrected it.

@lululxvi lululxvi merged commit 3ec0bc7 into lululxvi:master Oct 27, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants