So, I had a problem with two models that led me to implement this.
In the first one, I had a free-form batch shape, which isn't compatible with keras-js, and in the second one, automatic parameter renaming in newer versions of Keras, which renamed a node from "class_scores_1" to "class_scores", but maintained the original weight name, "class_scores_1/kernel:0", was unable to load.
By implementing this adjustment layer, I can identify such error conditions, and manually add any necessary corrections, without having to wait for such inconsistencies to be resolved, or mess around trying different versions:
Having this may allow users to work more consistently with the still somewhat experimental API, and I'm thinking it may be useful on a broader scale. For me, it was critical to get the implementation running.
So, I had a problem with two models that led me to implement this. In the first one, I had a free-form batch shape, which isn't compatible with keras-js, and in the second one, automatic parameter renaming in newer versions of Keras, which renamed a node from "class_scores_1" to "class_scores", but maintained the original weight name, "class_scores_1/kernel:0", was unable to load.
By implementing this adjustment layer, I can identify such error conditions, and manually add any necessary corrections, without having to wait for such inconsistencies to be resolved, or mess around trying different versions:
Having this may allow users to work more consistently with the still somewhat experimental API, and I'm thinking it may be useful on a broader scale. For me, it was critical to get the implementation running.