I am using a pretrained (in Python) Keras model by loading it into JavaScript with tensorflow.js and using the tensorflow.js library. This model has a GaussianNoise input layer, and a GaussianDropout layer, with respective properties stddev and rate.
After loading the model, say:
let model;
(async function () {
model = await tf.loadLayersModel("TensorFlowModels/dnn_fscav.json");
})();
In the same path I keep the weights in a .bin file. Now, my problem is that I need to change the stddev of the GaussianNoise layer and the rate of the GaussianDropout after loading the model, ideally directly from the model. I have looked into the model tensorflow object and its layers, but I could not find these properties.
I also know I can directly change these properties from the JSON file, but that means reading the JSON, modify it, and then read it with tensorflow.. which is not ideal. I have also looked at the tensorflow.js API reference, but found no explanation on how to do this.
Does anyone know a cleaner way to change layers properties from a loaded model?