python - How to set non-trainable weights? - Stack Overflow

The method keras.Model.set_weights seems to only take trainable weights. Non-trainable weights such as

The method keras.Model.set_weights seems to only take trainable weights. Non-trainable weights such as those from normalization layers cannot be imported this way. This is problematic, since in Keras with JAX backend, we can only perform stateless operations. That is; update the weights separate from the model. Therefore, before saving a model using keras.Model.save, it is required to load in the weights. However, since non-trainable weights cannot be loaded in (and therefore not saved in the .keras format), the saved model will underperform.

Is it possible to load/set the non-trainable weights in a Keras model? More generally, is there any way to save the complete model, including non-trainable weights when using JAX as backend?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742411973a4438996.html

相关推荐

  • python - How to set non-trainable weights? - Stack Overflow

    The method keras.Model.set_weights seems to only take trainable weights. Non-trainable weights such as

    14小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信