How to get C# class for a pre-trained model.
Hello: I found a few pre-trained models from internet. They come with .H5 model file and a Json format file. The following is one Json format file: styMA.json { "class_name": "Sequential", "config": { "name": "sequential", "layers": [{ "class_name": "Dense", "config": { "name": "dense_1", "trainable": true, "batch_input_shape": [null, 512], "dtype": "float32", "units": 512, "activation": "linear", "use_bias": true, "kernel_initializer": { "class_name": "GlorotUniform", "config": { "seed": null } }, "bias_initializer": { "class_name": "Zeros", "config": {} }, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null } }, { "class_name": "LeakyReLU", "config": { "name": "leaky_re_lu_14", "trainable": true, "dtype": "float32", "alpha": 0.20000000298023224 } }, { "class_name": "Dense", "config": { "name": "dense_2", "trainable": true, "dtype": "float32", "units": 512, "activation": "linear", "use_bias": true, "kernel_initializer": { "class_name": "GlorotUniform", "config": { "seed": null } }, "bias_initializer": { "class_name": "Zeros", "config": {} }, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null } }, { "class_name": "LeakyReLU", "config": { "name": "leaky_re_lu_15", "trainable": true, "dtype": "float32", "alpha": 0.20000000298023224 } }, { "class_name": "Dense", "config": { "name": "dense_3", "trainable": true, "dtype": "float32", "units": 512, "activation": "linear", "use_bias": true, "kernel_initializer": { "class_name": "GlorotUniform", "config": { "seed": null } }, "bias_initializer": { "class_name": "Zeros", "config": {} }, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null } }, { "class_name": "LeakyReLU", "config": { "name": "leaky_re_lu_16", "trainable": true, "dtype": "float32", "alpha": 0.20000000298023224 } }, { "class_name": "Dense", "config": { "name": "dense_4", "trainable": true, "dtype": "float32", "units": 512, "activation": "linear", "use_bias": true, "kernel_initializer": { "class_name": "GlorotUniform", "config": { "seed": null } }, "bias_initializer": { "class_name": "Zeros", "config": {} }, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null } }, { "class_name": "LeakyReLU", "config": { "name": "leaky_re_lu_17", "trainable": true, "dtype": "float32", "alpha": 0.20000000298023224 } }] }, "keras_version": "2.2.4-tf", "backend": "tensorflow" }
I want to use the pre-trained model to generate some images. I want to how I can load the model: styMA_28.h5 file. And use the styMA.json file to generate C# class. So I can write C# code to use the model to generate a target image. What kind of tools I can use to convert styMA.json to a C# class, like QuickType? Please advise!