0
$\begingroup$

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?

enter image description here

enter image description here enter image description here

$\endgroup$

1 Answer 1

2
$\begingroup$

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.

$\endgroup$
1
  • $\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$
    – Olfa2
    Commented May 29, 2021 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.