Skip to content

Instantly share code, notes, and snippets.

@AyaanZaveri
Created February 10, 2022 16:16
Show Gist options
  • Save AyaanZaveri/2401b861d71987c6eebda14bd41357e8 to your computer and use it in GitHub Desktop.
Save AyaanZaveri/2401b861d71987c6eebda14bd41357e8 to your computer and use it in GitHub Desktop.
{
"format": "layers-model",
"generatedBy": "keras v2.7.0",
"convertedBy": "TensorFlow.js Converter v3.13.0",
"modelTopology": {
"keras_version": "2.7.0",
"backend": "tensorflow",
"model_config": {
"class_name": "Sequential",
"config": {
"name": "sequential",
"layers": [
{
"class_name": "InputLayer",
"config": {
"batch_input_shape": [
null,
28,
28,
1
],
"dtype": "float32",
"sparse": false,
"ragged": false,
"name": "conv2d_input"
}
},
{
"class_name": "Conv2D",
"config": {
"name": "conv2d",
"trainable": true,
"batch_input_shape": [
null,
28,
28,
1
],
"dtype": "float32",
"filters": 64,
"kernel_size": [
3,
3
],
"strides": [
1,
1
],
"padding": "valid",
"data_format": "channels_last",
"dilation_rate": [
1,
1
],
"groups": 1,
"activation": "relu",
"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": "Conv2D",
"config": {
"name": "conv2d_1",
"trainable": true,
"dtype": "float32",
"filters": 64,
"kernel_size": [
3,
3
],
"strides": [
1,
1
],
"padding": "valid",
"data_format": "channels_last",
"dilation_rate": [
1,
1
],
"groups": 1,
"activation": "relu",
"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": "MaxPooling2D",
"config": {
"name": "max_pooling2d",
"trainable": true,
"dtype": "float32",
"pool_size": [
2,
2
],
"padding": "valid",
"strides": [
2,
2
],
"data_format": "channels_last"
}
},
{
"class_name": "BatchNormalization",
"config": {
"name": "batch_normalization",
"trainable": true,
"dtype": "float32",
"axis": [
3
],
"momentum": 0.99,
"epsilon": 0.001,
"center": true,
"scale": true,
"beta_initializer": {
"class_name": "Zeros",
"config": {}
},
"gamma_initializer": {
"class_name": "Ones",
"config": {}
},
"moving_mean_initializer": {
"class_name": "Zeros",
"config": {}
},
"moving_variance_initializer": {
"class_name": "Ones",
"config": {}
},
"beta_regularizer": null,
"gamma_regularizer": null,
"beta_constraint": null,
"gamma_constraint": null
}
},
{
"class_name": "Conv2D",
"config": {
"name": "conv2d_2",
"trainable": true,
"dtype": "float32",
"filters": 128,
"kernel_size": [
3,
3
],
"strides": [
1,
1
],
"padding": "valid",
"data_format": "channels_last",
"dilation_rate": [
1,
1
],
"groups": 1,
"activation": "relu",
"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": "Conv2D",
"config": {
"name": "conv2d_3",
"trainable": true,
"dtype": "float32",
"filters": 128,
"kernel_size": [
3,
3
],
"strides": [
1,
1
],
"padding": "valid",
"data_format": "channels_last",
"dilation_rate": [
1,
1
],
"groups": 1,
"activation": "relu",
"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": "MaxPooling2D",
"config": {
"name": "max_pooling2d_1",
"trainable": true,
"dtype": "float32",
"pool_size": [
2,
2
],
"padding": "valid",
"strides": [
2,
2
],
"data_format": "channels_last"
}
},
{
"class_name": "BatchNormalization",
"config": {
"name": "batch_normalization_1",
"trainable": true,
"dtype": "float32",
"axis": [
3
],
"momentum": 0.99,
"epsilon": 0.001,
"center": true,
"scale": true,
"beta_initializer": {
"class_name": "Zeros",
"config": {}
},
"gamma_initializer": {
"class_name": "Ones",
"config": {}
},
"moving_mean_initializer": {
"class_name": "Zeros",
"config": {}
},
"moving_variance_initializer": {
"class_name": "Ones",
"config": {}
},
"beta_regularizer": null,
"gamma_regularizer": null,
"beta_constraint": null,
"gamma_constraint": null
}
},
{
"class_name": "Conv2D",
"config": {
"name": "conv2d_4",
"trainable": true,
"dtype": "float32",
"filters": 256,
"kernel_size": [
3,
3
],
"strides": [
1,
1
],
"padding": "valid",
"data_format": "channels_last",
"dilation_rate": [
1,
1
],
"groups": 1,
"activation": "relu",
"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": "MaxPooling2D",
"config": {
"name": "max_pooling2d_2",
"trainable": true,
"dtype": "float32",
"pool_size": [
2,
2
],
"padding": "valid",
"strides": [
2,
2
],
"data_format": "channels_last"
}
},
{
"class_name": "Flatten",
"config": {
"name": "flatten",
"trainable": true,
"dtype": "float32",
"data_format": "channels_last"
}
},
{
"class_name": "BatchNormalization",
"config": {
"name": "batch_normalization_2",
"trainable": true,
"dtype": "float32",
"axis": [
1
],
"momentum": 0.99,
"epsilon": 0.001,
"center": true,
"scale": true,
"beta_initializer": {
"class_name": "Zeros",
"config": {}
},
"gamma_initializer": {
"class_name": "Ones",
"config": {}
},
"moving_mean_initializer": {
"class_name": "Zeros",
"config": {}
},
"moving_variance_initializer": {
"class_name": "Ones",
"config": {}
},
"beta_regularizer": null,
"gamma_regularizer": null,
"beta_constraint": null,
"gamma_constraint": null
}
},
{
"class_name": "Dense",
"config": {
"name": "dense",
"trainable": true,
"dtype": "float32",
"units": 512,
"activation": "relu",
"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": "Dense",
"config": {
"name": "dense_1",
"trainable": true,
"dtype": "float32",
"units": 10,
"activation": "softmax",
"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
}
}
]
}
},
"training_config": {
"loss": "sparse_categorical_crossentropy",
"metrics": [
[
{
"class_name": "MeanMetricWrapper",
"config": {
"name": "accuracy",
"dtype": "float32",
"fn": "sparse_categorical_accuracy"
}
}
]
],
"weighted_metrics": null,
"loss_weights": null,
"optimizer_config": {
"class_name": "Adam",
"config": {
"name": "Adam",
"learning_rate": 0.0010000000474974513,
"decay": 0.0,
"beta_1": 0.8999999761581421,
"beta_2": 0.9990000128746033,
"epsilon": 1e-07,
"amsgrad": false
}
}
}
},
"weightsManifest": [
{
"paths": [
"group1-shard1of1.bin"
],
"weights": [
{
"name": "batch_normalization/gamma",
"shape": [
64
],
"dtype": "float32"
},
{
"name": "batch_normalization/beta",
"shape": [
64
],
"dtype": "float32"
},
{
"name": "batch_normalization/moving_mean",
"shape": [
64
],
"dtype": "float32"
},
{
"name": "batch_normalization/moving_variance",
"shape": [
64
],
"dtype": "float32"
},
{
"name": "batch_normalization_1/gamma",
"shape": [
128
],
"dtype": "float32"
},
{
"name": "batch_normalization_1/beta",
"shape": [
128
],
"dtype": "float32"
},
{
"name": "batch_normalization_1/moving_mean",
"shape": [
128
],
"dtype": "float32"
},
{
"name": "batch_normalization_1/moving_variance",
"shape": [
128
],
"dtype": "float32"
},
{
"name": "batch_normalization_2/gamma",
"shape": [
256
],
"dtype": "float32"
},
{
"name": "batch_normalization_2/beta",
"shape": [
256
],
"dtype": "float32"
},
{
"name": "batch_normalization_2/moving_mean",
"shape": [
256
],
"dtype": "float32"
},
{
"name": "batch_normalization_2/moving_variance",
"shape": [
256
],
"dtype": "float32"
},
{
"name": "conv2d/kernel",
"shape": [
3,
3,
1,
64
],
"dtype": "float32"
},
{
"name": "conv2d/bias",
"shape": [
64
],
"dtype": "float32"
},
{
"name": "conv2d_1/kernel",
"shape": [
3,
3,
64,
64
],
"dtype": "float32"
},
{
"name": "conv2d_1/bias",
"shape": [
64
],
"dtype": "float32"
},
{
"name": "conv2d_2/kernel",
"shape": [
3,
3,
64,
128
],
"dtype": "float32"
},
{
"name": "conv2d_2/bias",
"shape": [
128
],
"dtype": "float32"
},
{
"name": "conv2d_3/kernel",
"shape": [
3,
3,
128,
128
],
"dtype": "float32"
},
{
"name": "conv2d_3/bias",
"shape": [
128
],
"dtype": "float32"
},
{
"name": "conv2d_4/kernel",
"shape": [
3,
3,
128,
256
],
"dtype": "float32"
},
{
"name": "conv2d_4/bias",
"shape": [
256
],
"dtype": "float32"
},
{
"name": "dense/kernel",
"shape": [
256,
512
],
"dtype": "float32"
},
{
"name": "dense/bias",
"shape": [
512
],
"dtype": "float32"
},
{
"name": "dense_1/kernel",
"shape": [
512,
10
],
"dtype": "float32"
},
{
"name": "dense_1/bias",
"shape": [
10
],
"dtype": "float32"
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment