Closed Algue-Rythme closed 1 year ago
Thanks for your clear and reproducible issue.
As you mentioned, this issue comes from the default parameter of the SpectralInitializer
. A PR will be done soon, but if you want to avoid this problem, setting base_optimizer="orthogonal"
in the SpectralInitializer
or setting kernel_initializer="orthogonal"
will fix this.
Hi
I recently updated my local setting and I encountered the following warning:
Versions:
I think it is because of the line: https://github.com/deel-ai/deel-lip/blob/bb0db0bdb2c39b219be385a8a09770f4d505381e/deel/lip/initializers.py#L24
The same object is kept, even after being processed by
tensorflow.keras.initializers.get
: https://github.com/keras-team/keras/blob/e6784e4302c7b8cd116b74a784f4b78d60e83c26/keras/initializers/__init__.py#L197However, this is dangerous: the object instanciated in the
__init__
is shared among all instances, as illustrated below:This implies that identical matrices are built. This introduces strong bias in the model. The solution would be to re-instantiate the default initializer in every call to
__init__
.