Are Keras custom layer parameters non-trainable by default?
问题 I built a simple custom layer in Keras and was surprised to find that the parameters were not set to trainable by default. I can get it to work by explicitly setting the trainable attribute. I can't explain why this is by looking at documentation or code. Is this how it is supposed to be or I am doing something wrong which is making the parameters non-trainable by default? Code: import tensorflow as tf class MyDense(tf.keras.layers.Layer): def __init__(self, **kwargs): super(MyDense, self)._