Best to set self.built=True at the end of build() (#10191)
When using Keras on TensorFlow (in graph mode), via `tf.keras`, then calling `self.add_weight()` fails if `self.built==True`, so it is best to encourage users to set `self.built=True` at the *end* of their `build()` method, rather than just "somewhere".
Showing
想要评论请 注册 或 登录