I have tested the "ResNet" block and it works fine, but when I call it in the model class, it somehow it does not work properly? Is it related to the model definition?
1 Answer
$\begingroup$
$\endgroup$
1
In your code by default training=False
, set training=True
it will work right.
Also, since you are already subclassing keras.Model
you don't need to again call keras.Model
. Remove the model()
method, pass the input directly to call()
method by setting training=True.
-
$\begingroup$ Thank you sbp. it works now with training=True ... Actually the model function, it is useful for "model.summary()", otherwise, i can not visualiz the schema of my model. $\endgroup$– Olfa2Commented May 29, 2021 at 16:53