From 5cf643499d4be2ba1b547e9ed4339ce8ea3b98ab Mon Sep 17 00:00:00 2001 From: Leon Chen Date: Thu, 6 Oct 2016 03:03:50 -0400 Subject: [PATCH] start ResNet50 ImageNet demo --- demos/data/resnet50/resnet50.json | 1 + demos/data/resnet50/resnet50_metadata.json | 1 + demos/data/resnet50/resnet50_weights.buf | 3 + demos/notebooks/resnet50.ipynb | 111 ++++++++++++++++++ demos/src/resnet50.css | 102 ++++++++++++++++ demos/src/resnet50.js | 129 +++++++++++++++++++++ 6 files changed, 347 insertions(+) create mode 100644 demos/data/resnet50/resnet50.json create mode 100644 demos/data/resnet50/resnet50_metadata.json create mode 100644 demos/data/resnet50/resnet50_weights.buf create mode 100644 demos/notebooks/resnet50.ipynb create mode 100644 demos/src/resnet50.css create mode 100644 demos/src/resnet50.js diff --git a/demos/data/resnet50/resnet50.json b/demos/data/resnet50/resnet50.json new file mode 100644 index 0000000..d88fd60 --- /dev/null +++ b/demos/data/resnet50/resnet50.json @@ -0,0 +1 @@ +{"keras_version": "1.1.0", "class_name": "Model", "config": {"layers": [{"name": "input_1", "class_name": "InputLayer", "config": {"sparse": false, "batch_input_shape": [null, 224, 224, 3], "input_dtype": "float32", "name": "input_1"}, "inbound_nodes": []}, {"name": "zeropadding2d_1", "class_name": "ZeroPadding2D", "config": {"padding": [3, 3], "name": "zeropadding2d_1", "trainable": true}, "inbound_nodes": [[["input_1", 0, 0]]]}, {"name": "conv1", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 64, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "conv1", "nb_col": 7, "W_regularizer": null, "subsample": [2, 2], "bias": true, "nb_row": 7}, "inbound_nodes": [[["zeropadding2d_1", 0, 0]]]}, {"name": "bn_conv1", "class_name": "BatchNormalization", "config": {"name": "bn_conv1", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["conv1", 0, 0]]]}, {"name": "activation_1", "class_name": "Activation", "config": {"name": "activation_1", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn_conv1", 0, 0]]]}, {"name": "maxpooling2d_1", "class_name": "MaxPooling2D", "config": {"pool_size": [3, 3], "name": "maxpooling2d_1", "strides": [2, 2], "dim_ordering": "tf", "border_mode": "valid", "trainable": true}, "inbound_nodes": [[["activation_1", 0, 0]]]}, {"name": "res2a_branch2a", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 64, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res2a_branch2a", "nb_col": 1, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 1}, "inbound_nodes": [[["maxpooling2d_1", 0, 0]]]}, {"name": "bn2a_branch2a", "class_name": "BatchNormalization", "config": {"name": "bn2a_branch2a", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res2a_branch2a", 0, 0]]]}, {"name": "activation_2", "class_name": "Activation", "config": {"name": "activation_2", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn2a_branch2a", 0, 0]]]}, {"name": "res2a_branch2b", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "same", "W_constraint": null, "nb_filter": 64, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res2a_branch2b", "nb_col": 3, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 3}, "inbound_nodes": [[["activation_2", 0, 0]]]}, {"name": "bn2a_branch2b", "class_name": "BatchNormalization", "config": {"name": "bn2a_branch2b", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res2a_branch2b", 0, 0]]]}, {"name": "activation_3", "class_name": "Activation", "config": {"name": "activation_3", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn2a_branch2b", 0, 0]]]}, {"name": "res2a_branch2c", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 256, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res2a_branch2c", "nb_col": 1, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_3", 0, 0]]]}, {"name": "res2a_branch1", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 256, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res2a_branch1", "nb_col": 1, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 1}, "inbound_nodes": [[["maxpooling2d_1", 0, 0]]]}, {"name": "bn2a_branch2c", "class_name": "BatchNormalization", "config": {"name": "bn2a_branch2c", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res2a_branch2c", 0, 0]]]}, {"name": "bn2a_branch1", "class_name": "BatchNormalization", "config": {"name": "bn2a_branch1", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res2a_branch1", 0, 0]]]}, {"name": "merge_1", "class_name": "Merge", "config": {"mode_type": "raw", "name": "merge_1", "concat_axis": -1, "output_shape_type": "raw", "dot_axes": -1, "output_shape": null, "mode": "sum"}, "inbound_nodes": [[["bn2a_branch2c", 0, 0], ["bn2a_branch1", 0, 0]]]}, {"name": "activation_4", "class_name": "Activation", "config": {"name": "activation_4", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["merge_1", 0, 0]]]}, {"name": "res2b_branch2a", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 64, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res2b_branch2a", "nb_col": 1, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_4", 0, 0]]]}, {"name": "bn2b_branch2a", "class_name": "BatchNormalization", "config": {"name": "bn2b_branch2a", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res2b_branch2a", 0, 0]]]}, {"name": "activation_5", "class_name": "Activation", "config": {"name": "activation_5", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn2b_branch2a", 0, 0]]]}, {"name": "res2b_branch2b", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "same", "W_constraint": null, "nb_filter": 64, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res2b_branch2b", "nb_col": 3, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 3}, "inbound_nodes": [[["activation_5", 0, 0]]]}, {"name": "bn2b_branch2b", "class_name": "BatchNormalization", "config": {"name": "bn2b_branch2b", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res2b_branch2b", 0, 0]]]}, {"name": "activation_6", "class_name": "Activation", "config": {"name": "activation_6", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn2b_branch2b", 0, 0]]]}, {"name": "res2b_branch2c", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 256, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res2b_branch2c", "nb_col": 1, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_6", 0, 0]]]}, {"name": "bn2b_branch2c", "class_name": "BatchNormalization", "config": {"name": "bn2b_branch2c", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res2b_branch2c", 0, 0]]]}, {"name": "merge_2", "class_name": "Merge", "config": {"mode_type": "raw", "name": "merge_2", "concat_axis": -1, "output_shape_type": "raw", "dot_axes": -1, "output_shape": null, "mode": "sum"}, "inbound_nodes": [[["bn2b_branch2c", 0, 0], ["activation_4", 0, 0]]]}, {"name": "activation_7", "class_name": "Activation", "config": {"name": "activation_7", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["merge_2", 0, 0]]]}, {"name": "res2c_branch2a", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 64, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res2c_branch2a", "nb_col": 1, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_7", 0, 0]]]}, {"name": "bn2c_branch2a", "class_name": "BatchNormalization", "config": {"name": "bn2c_branch2a", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res2c_branch2a", 0, 0]]]}, {"name": "activation_8", "class_name": "Activation", "config": {"name": "activation_8", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn2c_branch2a", 0, 0]]]}, {"name": "res2c_branch2b", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "same", "W_constraint": null, "nb_filter": 64, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res2c_branch2b", "nb_col": 3, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 3}, "inbound_nodes": [[["activation_8", 0, 0]]]}, {"name": "bn2c_branch2b", "class_name": "BatchNormalization", "config": {"name": "bn2c_branch2b", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res2c_branch2b", 0, 0]]]}, {"name": "activation_9", "class_name": "Activation", "config": {"name": "activation_9", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn2c_branch2b", 0, 0]]]}, {"name": "res2c_branch2c", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 256, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res2c_branch2c", "nb_col": 1, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_9", 0, 0]]]}, {"name": "bn2c_branch2c", "class_name": "BatchNormalization", "config": {"name": "bn2c_branch2c", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res2c_branch2c", 0, 0]]]}, {"name": "merge_3", "class_name": "Merge", "config": {"mode_type": "raw", "name": "merge_3", "concat_axis": -1, "output_shape_type": "raw", "dot_axes": -1, "output_shape": null, "mode": "sum"}, "inbound_nodes": [[["bn2c_branch2c", 0, 0], ["activation_7", 0, 0]]]}, {"name": "activation_10", "class_name": "Activation", "config": {"name": "activation_10", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["merge_3", 0, 0]]]}, {"name": "res3a_branch2a", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 128, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res3a_branch2a", "nb_col": 1, "W_regularizer": null, "subsample": [2, 2], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_10", 0, 0]]]}, {"name": "bn3a_branch2a", "class_name": "BatchNormalization", "config": {"name": "bn3a_branch2a", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res3a_branch2a", 0, 0]]]}, {"name": "activation_11", "class_name": "Activation", "config": {"name": "activation_11", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn3a_branch2a", 0, 0]]]}, {"name": "res3a_branch2b", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "same", "W_constraint": null, "nb_filter": 128, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res3a_branch2b", "nb_col": 3, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 3}, "inbound_nodes": [[["activation_11", 0, 0]]]}, {"name": "bn3a_branch2b", "class_name": "BatchNormalization", "config": {"name": "bn3a_branch2b", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res3a_branch2b", 0, 0]]]}, {"name": "activation_12", "class_name": "Activation", "config": {"name": "activation_12", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn3a_branch2b", 0, 0]]]}, {"name": "res3a_branch2c", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 512, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res3a_branch2c", "nb_col": 1, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_12", 0, 0]]]}, {"name": "res3a_branch1", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 512, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res3a_branch1", "nb_col": 1, "W_regularizer": null, "subsample": [2, 2], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_10", 0, 0]]]}, {"name": "bn3a_branch2c", "class_name": "BatchNormalization", "config": {"name": "bn3a_branch2c", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res3a_branch2c", 0, 0]]]}, {"name": "bn3a_branch1", "class_name": "BatchNormalization", "config": {"name": "bn3a_branch1", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res3a_branch1", 0, 0]]]}, {"name": "merge_4", "class_name": "Merge", "config": {"mode_type": "raw", "name": "merge_4", "concat_axis": -1, "output_shape_type": "raw", "dot_axes": -1, "output_shape": null, "mode": "sum"}, "inbound_nodes": [[["bn3a_branch2c", 0, 0], ["bn3a_branch1", 0, 0]]]}, {"name": "activation_13", "class_name": "Activation", "config": {"name": "activation_13", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["merge_4", 0, 0]]]}, {"name": "res3b_branch2a", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 128, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res3b_branch2a", "nb_col": 1, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_13", 0, 0]]]}, {"name": "bn3b_branch2a", "class_name": "BatchNormalization", "config": {"name": "bn3b_branch2a", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res3b_branch2a", 0, 0]]]}, {"name": "activation_14", "class_name": "Activation", "config": {"name": "activation_14", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn3b_branch2a", 0, 0]]]}, {"name": "res3b_branch2b", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "same", "W_constraint": null, "nb_filter": 128, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res3b_branch2b", "nb_col": 3, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 3}, "inbound_nodes": [[["activation_14", 0, 0]]]}, {"name": "bn3b_branch2b", "class_name": "BatchNormalization", "config": {"name": "bn3b_branch2b", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res3b_branch2b", 0, 0]]]}, {"name": "activation_15", "class_name": "Activation", "config": {"name": "activation_15", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn3b_branch2b", 0, 0]]]}, {"name": "res3b_branch2c", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 512, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res3b_branch2c", "nb_col": 1, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_15", 0, 0]]]}, {"name": "bn3b_branch2c", "class_name": "BatchNormalization", "config": {"name": "bn3b_branch2c", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res3b_branch2c", 0, 0]]]}, {"name": "merge_5", "class_name": "Merge", "config": {"mode_type": "raw", "name": "merge_5", "concat_axis": -1, "output_shape_type": "raw", "dot_axes": -1, "output_shape": null, "mode": "sum"}, "inbound_nodes": [[["bn3b_branch2c", 0, 0], ["activation_13", 0, 0]]]}, {"name": "activation_16", "class_name": "Activation", "config": {"name": "activation_16", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["merge_5", 0, 0]]]}, {"name": "res3c_branch2a", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 128, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res3c_branch2a", "nb_col": 1, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_16", 0, 0]]]}, {"name": "bn3c_branch2a", "class_name": "BatchNormalization", "config": {"name": "bn3c_branch2a", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res3c_branch2a", 0, 0]]]}, {"name": "activation_17", "class_name": "Activation", "config": {"name": "activation_17", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn3c_branch2a", 0, 0]]]}, {"name": "res3c_branch2b", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "same", "W_constraint": null, "nb_filter": 128, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res3c_branch2b", "nb_col": 3, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 3}, "inbound_nodes": [[["activation_17", 0, 0]]]}, {"name": "bn3c_branch2b", "class_name": "BatchNormalization", "config": {"name": "bn3c_branch2b", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res3c_branch2b", 0, 0]]]}, {"name": "activation_18", "class_name": "Activation", "config": {"name": "activation_18", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn3c_branch2b", 0, 0]]]}, {"name": "res3c_branch2c", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 512, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res3c_branch2c", "nb_col": 1, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_18", 0, 0]]]}, {"name": "bn3c_branch2c", "class_name": "BatchNormalization", "config": {"name": "bn3c_branch2c", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res3c_branch2c", 0, 0]]]}, {"name": "merge_6", "class_name": "Merge", "config": {"mode_type": "raw", "name": "merge_6", "concat_axis": -1, "output_shape_type": "raw", "dot_axes": -1, "output_shape": null, "mode": "sum"}, "inbound_nodes": [[["bn3c_branch2c", 0, 0], ["activation_16", 0, 0]]]}, {"name": "activation_19", "class_name": "Activation", "config": {"name": "activation_19", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["merge_6", 0, 0]]]}, {"name": "res3d_branch2a", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 128, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res3d_branch2a", "nb_col": 1, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_19", 0, 0]]]}, {"name": "bn3d_branch2a", "class_name": "BatchNormalization", "config": {"name": "bn3d_branch2a", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res3d_branch2a", 0, 0]]]}, {"name": "activation_20", "class_name": "Activation", "config": {"name": "activation_20", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn3d_branch2a", 0, 0]]]}, {"name": "res3d_branch2b", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "same", "W_constraint": null, "nb_filter": 128, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res3d_branch2b", "nb_col": 3, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 3}, "inbound_nodes": [[["activation_20", 0, 0]]]}, {"name": "bn3d_branch2b", "class_name": "BatchNormalization", "config": {"name": "bn3d_branch2b", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res3d_branch2b", 0, 0]]]}, {"name": "activation_21", "class_name": "Activation", "config": {"name": "activation_21", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn3d_branch2b", 0, 0]]]}, {"name": "res3d_branch2c", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 512, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res3d_branch2c", "nb_col": 1, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_21", 0, 0]]]}, {"name": "bn3d_branch2c", "class_name": "BatchNormalization", "config": {"name": "bn3d_branch2c", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res3d_branch2c", 0, 0]]]}, {"name": "merge_7", "class_name": "Merge", "config": {"mode_type": "raw", "name": "merge_7", "concat_axis": -1, "output_shape_type": "raw", "dot_axes": -1, "output_shape": null, "mode": "sum"}, "inbound_nodes": [[["bn3d_branch2c", 0, 0], ["activation_19", 0, 0]]]}, {"name": "activation_22", "class_name": "Activation", "config": {"name": "activation_22", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["merge_7", 0, 0]]]}, {"name": "res4a_branch2a", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 256, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res4a_branch2a", "nb_col": 1, "W_regularizer": null, "subsample": [2, 2], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_22", 0, 0]]]}, {"name": "bn4a_branch2a", "class_name": "BatchNormalization", "config": {"name": "bn4a_branch2a", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res4a_branch2a", 0, 0]]]}, {"name": "activation_23", "class_name": "Activation", "config": {"name": "activation_23", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn4a_branch2a", 0, 0]]]}, {"name": "res4a_branch2b", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "same", "W_constraint": null, "nb_filter": 256, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res4a_branch2b", "nb_col": 3, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 3}, "inbound_nodes": [[["activation_23", 0, 0]]]}, {"name": "bn4a_branch2b", "class_name": "BatchNormalization", "config": {"name": "bn4a_branch2b", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res4a_branch2b", 0, 0]]]}, {"name": "activation_24", "class_name": "Activation", "config": {"name": "activation_24", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn4a_branch2b", 0, 0]]]}, {"name": "res4a_branch2c", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 1024, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res4a_branch2c", "nb_col": 1, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_24", 0, 0]]]}, {"name": "res4a_branch1", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 1024, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res4a_branch1", "nb_col": 1, "W_regularizer": null, "subsample": [2, 2], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_22", 0, 0]]]}, {"name": "bn4a_branch2c", "class_name": "BatchNormalization", "config": {"name": "bn4a_branch2c", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res4a_branch2c", 0, 0]]]}, {"name": "bn4a_branch1", "class_name": "BatchNormalization", "config": {"name": "bn4a_branch1", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res4a_branch1", 0, 0]]]}, {"name": "merge_8", "class_name": "Merge", "config": {"mode_type": "raw", "name": "merge_8", "concat_axis": -1, "output_shape_type": "raw", "dot_axes": -1, "output_shape": null, "mode": "sum"}, "inbound_nodes": [[["bn4a_branch2c", 0, 0], ["bn4a_branch1", 0, 0]]]}, {"name": "activation_25", "class_name": "Activation", "config": {"name": "activation_25", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["merge_8", 0, 0]]]}, {"name": "res4b_branch2a", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 256, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res4b_branch2a", "nb_col": 1, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_25", 0, 0]]]}, {"name": "bn4b_branch2a", "class_name": "BatchNormalization", "config": {"name": "bn4b_branch2a", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res4b_branch2a", 0, 0]]]}, {"name": "activation_26", "class_name": "Activation", "config": {"name": "activation_26", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn4b_branch2a", 0, 0]]]}, {"name": "res4b_branch2b", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "same", "W_constraint": null, "nb_filter": 256, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res4b_branch2b", "nb_col": 3, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 3}, "inbound_nodes": [[["activation_26", 0, 0]]]}, {"name": "bn4b_branch2b", "class_name": "BatchNormalization", "config": {"name": "bn4b_branch2b", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res4b_branch2b", 0, 0]]]}, {"name": "activation_27", "class_name": "Activation", "config": {"name": "activation_27", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn4b_branch2b", 0, 0]]]}, {"name": "res4b_branch2c", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 1024, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res4b_branch2c", "nb_col": 1, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_27", 0, 0]]]}, {"name": "bn4b_branch2c", "class_name": "BatchNormalization", "config": {"name": "bn4b_branch2c", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res4b_branch2c", 0, 0]]]}, {"name": "merge_9", "class_name": "Merge", "config": {"mode_type": "raw", "name": "merge_9", "concat_axis": -1, "output_shape_type": "raw", "dot_axes": -1, "output_shape": null, "mode": "sum"}, "inbound_nodes": [[["bn4b_branch2c", 0, 0], ["activation_25", 0, 0]]]}, {"name": "activation_28", "class_name": "Activation", "config": {"name": "activation_28", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["merge_9", 0, 0]]]}, {"name": "res4c_branch2a", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 256, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res4c_branch2a", "nb_col": 1, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_28", 0, 0]]]}, {"name": "bn4c_branch2a", "class_name": "BatchNormalization", "config": {"name": "bn4c_branch2a", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res4c_branch2a", 0, 0]]]}, {"name": "activation_29", "class_name": "Activation", "config": {"name": "activation_29", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn4c_branch2a", 0, 0]]]}, {"name": "res4c_branch2b", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "same", "W_constraint": null, "nb_filter": 256, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res4c_branch2b", "nb_col": 3, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 3}, "inbound_nodes": [[["activation_29", 0, 0]]]}, {"name": "bn4c_branch2b", "class_name": "BatchNormalization", "config": {"name": "bn4c_branch2b", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res4c_branch2b", 0, 0]]]}, {"name": "activation_30", "class_name": "Activation", "config": {"name": "activation_30", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn4c_branch2b", 0, 0]]]}, {"name": "res4c_branch2c", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 1024, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res4c_branch2c", "nb_col": 1, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_30", 0, 0]]]}, {"name": "bn4c_branch2c", "class_name": "BatchNormalization", "config": {"name": "bn4c_branch2c", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res4c_branch2c", 0, 0]]]}, {"name": "merge_10", "class_name": "Merge", "config": {"mode_type": "raw", "name": "merge_10", "concat_axis": -1, "output_shape_type": "raw", "dot_axes": -1, "output_shape": null, "mode": "sum"}, "inbound_nodes": [[["bn4c_branch2c", 0, 0], ["activation_28", 0, 0]]]}, {"name": "activation_31", "class_name": "Activation", "config": {"name": "activation_31", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["merge_10", 0, 0]]]}, {"name": "res4d_branch2a", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 256, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res4d_branch2a", "nb_col": 1, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_31", 0, 0]]]}, {"name": "bn4d_branch2a", "class_name": "BatchNormalization", "config": {"name": "bn4d_branch2a", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res4d_branch2a", 0, 0]]]}, {"name": "activation_32", "class_name": "Activation", "config": {"name": "activation_32", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn4d_branch2a", 0, 0]]]}, {"name": "res4d_branch2b", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "same", "W_constraint": null, "nb_filter": 256, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res4d_branch2b", "nb_col": 3, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 3}, "inbound_nodes": [[["activation_32", 0, 0]]]}, {"name": "bn4d_branch2b", "class_name": "BatchNormalization", "config": {"name": "bn4d_branch2b", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res4d_branch2b", 0, 0]]]}, {"name": "activation_33", "class_name": "Activation", "config": {"name": "activation_33", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn4d_branch2b", 0, 0]]]}, {"name": "res4d_branch2c", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 1024, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res4d_branch2c", "nb_col": 1, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_33", 0, 0]]]}, {"name": "bn4d_branch2c", "class_name": "BatchNormalization", "config": {"name": "bn4d_branch2c", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res4d_branch2c", 0, 0]]]}, {"name": "merge_11", "class_name": "Merge", "config": {"mode_type": "raw", "name": "merge_11", "concat_axis": -1, "output_shape_type": "raw", "dot_axes": -1, "output_shape": null, "mode": "sum"}, "inbound_nodes": [[["bn4d_branch2c", 0, 0], ["activation_31", 0, 0]]]}, {"name": "activation_34", "class_name": "Activation", "config": {"name": "activation_34", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["merge_11", 0, 0]]]}, {"name": "res4e_branch2a", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 256, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res4e_branch2a", "nb_col": 1, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_34", 0, 0]]]}, {"name": "bn4e_branch2a", "class_name": "BatchNormalization", "config": {"name": "bn4e_branch2a", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res4e_branch2a", 0, 0]]]}, {"name": "activation_35", "class_name": "Activation", "config": {"name": "activation_35", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn4e_branch2a", 0, 0]]]}, {"name": "res4e_branch2b", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "same", "W_constraint": null, "nb_filter": 256, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res4e_branch2b", "nb_col": 3, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 3}, "inbound_nodes": [[["activation_35", 0, 0]]]}, {"name": "bn4e_branch2b", "class_name": "BatchNormalization", "config": {"name": "bn4e_branch2b", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res4e_branch2b", 0, 0]]]}, {"name": "activation_36", "class_name": "Activation", "config": {"name": "activation_36", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn4e_branch2b", 0, 0]]]}, {"name": "res4e_branch2c", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 1024, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res4e_branch2c", "nb_col": 1, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_36", 0, 0]]]}, {"name": "bn4e_branch2c", "class_name": "BatchNormalization", "config": {"name": "bn4e_branch2c", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res4e_branch2c", 0, 0]]]}, {"name": "merge_12", "class_name": "Merge", "config": {"mode_type": "raw", "name": "merge_12", "concat_axis": -1, "output_shape_type": "raw", "dot_axes": -1, "output_shape": null, "mode": "sum"}, "inbound_nodes": [[["bn4e_branch2c", 0, 0], ["activation_34", 0, 0]]]}, {"name": "activation_37", "class_name": "Activation", "config": {"name": "activation_37", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["merge_12", 0, 0]]]}, {"name": "res4f_branch2a", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 256, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res4f_branch2a", "nb_col": 1, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_37", 0, 0]]]}, {"name": "bn4f_branch2a", "class_name": "BatchNormalization", "config": {"name": "bn4f_branch2a", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res4f_branch2a", 0, 0]]]}, {"name": "activation_38", "class_name": "Activation", "config": {"name": "activation_38", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn4f_branch2a", 0, 0]]]}, {"name": "res4f_branch2b", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "same", "W_constraint": null, "nb_filter": 256, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res4f_branch2b", "nb_col": 3, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 3}, "inbound_nodes": [[["activation_38", 0, 0]]]}, {"name": "bn4f_branch2b", "class_name": "BatchNormalization", "config": {"name": "bn4f_branch2b", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res4f_branch2b", 0, 0]]]}, {"name": "activation_39", "class_name": "Activation", "config": {"name": "activation_39", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn4f_branch2b", 0, 0]]]}, {"name": "res4f_branch2c", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 1024, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res4f_branch2c", "nb_col": 1, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_39", 0, 0]]]}, {"name": "bn4f_branch2c", "class_name": "BatchNormalization", "config": {"name": "bn4f_branch2c", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res4f_branch2c", 0, 0]]]}, {"name": "merge_13", "class_name": "Merge", "config": {"mode_type": "raw", "name": "merge_13", "concat_axis": -1, "output_shape_type": "raw", "dot_axes": -1, "output_shape": null, "mode": "sum"}, "inbound_nodes": [[["bn4f_branch2c", 0, 0], ["activation_37", 0, 0]]]}, {"name": "activation_40", "class_name": "Activation", "config": {"name": "activation_40", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["merge_13", 0, 0]]]}, {"name": "res5a_branch2a", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 512, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res5a_branch2a", "nb_col": 1, "W_regularizer": null, "subsample": [2, 2], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_40", 0, 0]]]}, {"name": "bn5a_branch2a", "class_name": "BatchNormalization", "config": {"name": "bn5a_branch2a", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res5a_branch2a", 0, 0]]]}, {"name": "activation_41", "class_name": "Activation", "config": {"name": "activation_41", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn5a_branch2a", 0, 0]]]}, {"name": "res5a_branch2b", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "same", "W_constraint": null, "nb_filter": 512, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res5a_branch2b", "nb_col": 3, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 3}, "inbound_nodes": [[["activation_41", 0, 0]]]}, {"name": "bn5a_branch2b", "class_name": "BatchNormalization", "config": {"name": "bn5a_branch2b", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res5a_branch2b", 0, 0]]]}, {"name": "activation_42", "class_name": "Activation", "config": {"name": "activation_42", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn5a_branch2b", 0, 0]]]}, {"name": "res5a_branch2c", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 2048, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res5a_branch2c", "nb_col": 1, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_42", 0, 0]]]}, {"name": "res5a_branch1", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 2048, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res5a_branch1", "nb_col": 1, "W_regularizer": null, "subsample": [2, 2], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_40", 0, 0]]]}, {"name": "bn5a_branch2c", "class_name": "BatchNormalization", "config": {"name": "bn5a_branch2c", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res5a_branch2c", 0, 0]]]}, {"name": "bn5a_branch1", "class_name": "BatchNormalization", "config": {"name": "bn5a_branch1", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res5a_branch1", 0, 0]]]}, {"name": "merge_14", "class_name": "Merge", "config": {"mode_type": "raw", "name": "merge_14", "concat_axis": -1, "output_shape_type": "raw", "dot_axes": -1, "output_shape": null, "mode": "sum"}, "inbound_nodes": [[["bn5a_branch2c", 0, 0], ["bn5a_branch1", 0, 0]]]}, {"name": "activation_43", "class_name": "Activation", "config": {"name": "activation_43", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["merge_14", 0, 0]]]}, {"name": "res5b_branch2a", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 512, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res5b_branch2a", "nb_col": 1, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_43", 0, 0]]]}, {"name": "bn5b_branch2a", "class_name": "BatchNormalization", "config": {"name": "bn5b_branch2a", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res5b_branch2a", 0, 0]]]}, {"name": "activation_44", "class_name": "Activation", "config": {"name": "activation_44", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn5b_branch2a", 0, 0]]]}, {"name": "res5b_branch2b", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "same", "W_constraint": null, "nb_filter": 512, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res5b_branch2b", "nb_col": 3, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 3}, "inbound_nodes": [[["activation_44", 0, 0]]]}, {"name": "bn5b_branch2b", "class_name": "BatchNormalization", "config": {"name": "bn5b_branch2b", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res5b_branch2b", 0, 0]]]}, {"name": "activation_45", "class_name": "Activation", "config": {"name": "activation_45", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn5b_branch2b", 0, 0]]]}, {"name": "res5b_branch2c", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 2048, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res5b_branch2c", "nb_col": 1, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_45", 0, 0]]]}, {"name": "bn5b_branch2c", "class_name": "BatchNormalization", "config": {"name": "bn5b_branch2c", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res5b_branch2c", 0, 0]]]}, {"name": "merge_15", "class_name": "Merge", "config": {"mode_type": "raw", "name": "merge_15", "concat_axis": -1, "output_shape_type": "raw", "dot_axes": -1, "output_shape": null, "mode": "sum"}, "inbound_nodes": [[["bn5b_branch2c", 0, 0], ["activation_43", 0, 0]]]}, {"name": "activation_46", "class_name": "Activation", "config": {"name": "activation_46", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["merge_15", 0, 0]]]}, {"name": "res5c_branch2a", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 512, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res5c_branch2a", "nb_col": 1, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_46", 0, 0]]]}, {"name": "bn5c_branch2a", "class_name": "BatchNormalization", "config": {"name": "bn5c_branch2a", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res5c_branch2a", 0, 0]]]}, {"name": "activation_47", "class_name": "Activation", "config": {"name": "activation_47", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn5c_branch2a", 0, 0]]]}, {"name": "res5c_branch2b", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "same", "W_constraint": null, "nb_filter": 512, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res5c_branch2b", "nb_col": 3, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 3}, "inbound_nodes": [[["activation_47", 0, 0]]]}, {"name": "bn5c_branch2b", "class_name": "BatchNormalization", "config": {"name": "bn5c_branch2b", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res5c_branch2b", 0, 0]]]}, {"name": "activation_48", "class_name": "Activation", "config": {"name": "activation_48", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["bn5c_branch2b", 0, 0]]]}, {"name": "res5c_branch2c", "class_name": "Convolution2D", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "dim_ordering": "tf", "border_mode": "valid", "W_constraint": null, "nb_filter": 2048, "trainable": true, "activation": "linear", "init": "glorot_uniform", "name": "res5c_branch2c", "nb_col": 1, "W_regularizer": null, "subsample": [1, 1], "bias": true, "nb_row": 1}, "inbound_nodes": [[["activation_48", 0, 0]]]}, {"name": "bn5c_branch2c", "class_name": "BatchNormalization", "config": {"name": "bn5c_branch2c", "axis": 3, "gamma_regularizer": null, "beta_regularizer": null, "momentum": 0.99, "epsilon": 1e-05, "trainable": true, "mode": 0}, "inbound_nodes": [[["res5c_branch2c", 0, 0]]]}, {"name": "merge_16", "class_name": "Merge", "config": {"mode_type": "raw", "name": "merge_16", "concat_axis": -1, "output_shape_type": "raw", "dot_axes": -1, "output_shape": null, "mode": "sum"}, "inbound_nodes": [[["bn5c_branch2c", 0, 0], ["activation_46", 0, 0]]]}, {"name": "activation_49", "class_name": "Activation", "config": {"name": "activation_49", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["merge_16", 0, 0]]]}, {"name": "avg_pool", "class_name": "AveragePooling2D", "config": {"pool_size": [7, 7], "name": "avg_pool", "strides": [7, 7], "dim_ordering": "tf", "border_mode": "valid", "trainable": true}, "inbound_nodes": [[["activation_49", 0, 0]]]}, {"name": "flatten_1", "class_name": "Flatten", "config": {"name": "flatten_1", "trainable": true}, "inbound_nodes": [[["avg_pool", 0, 0]]]}, {"name": "fc1000", "class_name": "Dense", "config": {"b_constraint": null, "activity_regularizer": null, "b_regularizer": null, "W_constraint": null, "input_dim": null, "trainable": true, "activation": "softmax", "init": "glorot_uniform", "name": "fc1000", "W_regularizer": null, "output_dim": 1000, "bias": true}, "inbound_nodes": [[["flatten_1", 0, 0]]]}], "output_layers": [["fc1000", 0, 0]], "name": "model_1", "input_layers": [["input_1", 0, 0]]}} \ No newline at end of file diff --git a/demos/data/resnet50/resnet50_metadata.json b/demos/data/resnet50/resnet50_metadata.json new file mode 100644 index 0000000..ee19e98 --- /dev/null +++ b/demos/data/resnet50/resnet50_metadata.json @@ -0,0 +1 @@ +[{"layer_name": "conv1", "weight_name": "conv1_W:0", "type": "float32", "shape": [7, 7, 3, 64], "length": 9408, "offset": 0}, {"layer_name": "conv1", "weight_name": "conv1_b:0", "type": "float32", "shape": [64], "length": 64, "offset": 37632}, {"layer_name": "bn_conv1", "weight_name": "bn_conv1_gamma:0", "type": "float32", "shape": [64], "length": 64, "offset": 37888}, {"layer_name": "bn_conv1", "weight_name": "bn_conv1_beta:0", "type": "float32", "shape": [64], "length": 64, "offset": 38144}, {"layer_name": "bn_conv1", "weight_name": "bn_conv1_running_mean:0", "type": "float32", "shape": [64], "length": 64, "offset": 38400}, {"layer_name": "bn_conv1", "weight_name": "bn_conv1_running_std:0", "type": "float32", "shape": [64], "length": 64, "offset": 38656}, {"layer_name": "res2a_branch2a", "weight_name": "res2a_branch2a_W:0", "type": "float32", "shape": [1, 1, 64, 64], "length": 4096, "offset": 38912}, {"layer_name": "res2a_branch2a", "weight_name": "res2a_branch2a_b:0", "type": "float32", "shape": [64], "length": 64, "offset": 55296}, {"layer_name": "bn2a_branch2a", "weight_name": "bn2a_branch2a_gamma:0", "type": "float32", "shape": [64], "length": 64, "offset": 55552}, {"layer_name": "bn2a_branch2a", "weight_name": "bn2a_branch2a_beta:0", "type": "float32", "shape": [64], "length": 64, "offset": 55808}, {"layer_name": "bn2a_branch2a", "weight_name": "bn2a_branch2a_running_mean:0", "type": "float32", "shape": [64], "length": 64, "offset": 56064}, {"layer_name": "bn2a_branch2a", "weight_name": "bn2a_branch2a_running_std:0", "type": "float32", "shape": [64], "length": 64, "offset": 56320}, {"layer_name": "res2a_branch2b", "weight_name": "res2a_branch2b_W:0", "type": "float32", "shape": [3, 3, 64, 64], "length": 36864, "offset": 56576}, {"layer_name": "res2a_branch2b", "weight_name": "res2a_branch2b_b:0", "type": "float32", "shape": [64], "length": 64, "offset": 204032}, {"layer_name": "bn2a_branch2b", "weight_name": "bn2a_branch2b_gamma:0", "type": "float32", "shape": [64], "length": 64, "offset": 204288}, {"layer_name": "bn2a_branch2b", "weight_name": "bn2a_branch2b_beta:0", "type": "float32", "shape": [64], "length": 64, "offset": 204544}, {"layer_name": "bn2a_branch2b", "weight_name": "bn2a_branch2b_running_mean:0", "type": "float32", "shape": [64], "length": 64, "offset": 204800}, {"layer_name": "bn2a_branch2b", "weight_name": "bn2a_branch2b_running_std:0", "type": "float32", "shape": [64], "length": 64, "offset": 205056}, {"layer_name": "res2a_branch2c", "weight_name": "res2a_branch2c_W:0", "type": "float32", "shape": [1, 1, 64, 256], "length": 16384, "offset": 205312}, {"layer_name": "res2a_branch2c", "weight_name": "res2a_branch2c_b:0", "type": "float32", "shape": [256], "length": 256, "offset": 270848}, {"layer_name": "res2a_branch1", "weight_name": "res2a_branch1_W:0", "type": "float32", "shape": [1, 1, 64, 256], "length": 16384, "offset": 271872}, {"layer_name": "res2a_branch1", "weight_name": "res2a_branch1_b:0", "type": "float32", "shape": [256], "length": 256, "offset": 337408}, {"layer_name": "bn2a_branch2c", "weight_name": "bn2a_branch2c_gamma:0", "type": "float32", "shape": [256], "length": 256, "offset": 338432}, {"layer_name": "bn2a_branch2c", "weight_name": "bn2a_branch2c_beta:0", "type": "float32", "shape": [256], "length": 256, "offset": 339456}, {"layer_name": "bn2a_branch2c", "weight_name": "bn2a_branch2c_running_mean:0", "type": "float32", "shape": [256], "length": 256, "offset": 340480}, {"layer_name": "bn2a_branch2c", "weight_name": "bn2a_branch2c_running_std:0", "type": "float32", "shape": [256], "length": 256, "offset": 341504}, {"layer_name": "bn2a_branch1", "weight_name": "bn2a_branch1_gamma:0", "type": "float32", "shape": [256], "length": 256, "offset": 342528}, {"layer_name": "bn2a_branch1", "weight_name": "bn2a_branch1_beta:0", "type": "float32", "shape": [256], "length": 256, "offset": 343552}, {"layer_name": "bn2a_branch1", "weight_name": "bn2a_branch1_running_mean:0", "type": "float32", "shape": [256], "length": 256, "offset": 344576}, {"layer_name": "bn2a_branch1", "weight_name": "bn2a_branch1_running_std:0", "type": "float32", "shape": [256], "length": 256, "offset": 345600}, {"layer_name": "res2b_branch2a", "weight_name": "res2b_branch2a_W:0", "type": "float32", "shape": [1, 1, 256, 64], "length": 16384, "offset": 346624}, {"layer_name": "res2b_branch2a", "weight_name": "res2b_branch2a_b:0", "type": "float32", "shape": [64], "length": 64, "offset": 412160}, {"layer_name": "bn2b_branch2a", "weight_name": "bn2b_branch2a_gamma:0", "type": "float32", "shape": [64], "length": 64, "offset": 412416}, {"layer_name": "bn2b_branch2a", "weight_name": "bn2b_branch2a_beta:0", "type": "float32", "shape": [64], "length": 64, "offset": 412672}, {"layer_name": "bn2b_branch2a", "weight_name": "bn2b_branch2a_running_mean:0", "type": "float32", "shape": [64], "length": 64, "offset": 412928}, {"layer_name": "bn2b_branch2a", "weight_name": "bn2b_branch2a_running_std:0", "type": "float32", "shape": [64], "length": 64, "offset": 413184}, {"layer_name": "res2b_branch2b", "weight_name": "res2b_branch2b_W:0", "type": "float32", "shape": [3, 3, 64, 64], "length": 36864, "offset": 413440}, {"layer_name": "res2b_branch2b", "weight_name": "res2b_branch2b_b:0", "type": "float32", "shape": [64], "length": 64, "offset": 560896}, {"layer_name": "bn2b_branch2b", "weight_name": "bn2b_branch2b_gamma:0", "type": "float32", "shape": [64], "length": 64, "offset": 561152}, {"layer_name": "bn2b_branch2b", "weight_name": "bn2b_branch2b_beta:0", "type": "float32", "shape": [64], "length": 64, "offset": 561408}, {"layer_name": "bn2b_branch2b", "weight_name": "bn2b_branch2b_running_mean:0", "type": "float32", "shape": [64], "length": 64, "offset": 561664}, {"layer_name": "bn2b_branch2b", "weight_name": "bn2b_branch2b_running_std:0", "type": "float32", "shape": [64], "length": 64, "offset": 561920}, {"layer_name": "res2b_branch2c", "weight_name": "res2b_branch2c_W:0", "type": "float32", "shape": [1, 1, 64, 256], "length": 16384, "offset": 562176}, {"layer_name": "res2b_branch2c", "weight_name": "res2b_branch2c_b:0", "type": "float32", "shape": [256], "length": 256, "offset": 627712}, {"layer_name": "bn2b_branch2c", "weight_name": "bn2b_branch2c_gamma:0", "type": "float32", "shape": [256], "length": 256, "offset": 628736}, {"layer_name": "bn2b_branch2c", "weight_name": "bn2b_branch2c_beta:0", "type": "float32", "shape": [256], "length": 256, "offset": 629760}, {"layer_name": "bn2b_branch2c", "weight_name": "bn2b_branch2c_running_mean:0", "type": "float32", "shape": [256], "length": 256, "offset": 630784}, {"layer_name": "bn2b_branch2c", "weight_name": "bn2b_branch2c_running_std:0", "type": "float32", "shape": [256], "length": 256, "offset": 631808}, {"layer_name": "res2c_branch2a", "weight_name": "res2c_branch2a_W:0", "type": "float32", "shape": [1, 1, 256, 64], "length": 16384, "offset": 632832}, {"layer_name": "res2c_branch2a", "weight_name": "res2c_branch2a_b:0", "type": "float32", "shape": [64], "length": 64, "offset": 698368}, {"layer_name": "bn2c_branch2a", "weight_name": "bn2c_branch2a_gamma:0", "type": "float32", "shape": [64], "length": 64, "offset": 698624}, {"layer_name": "bn2c_branch2a", "weight_name": "bn2c_branch2a_beta:0", "type": "float32", "shape": [64], "length": 64, "offset": 698880}, {"layer_name": "bn2c_branch2a", "weight_name": "bn2c_branch2a_running_mean:0", "type": "float32", "shape": [64], "length": 64, "offset": 699136}, {"layer_name": "bn2c_branch2a", "weight_name": "bn2c_branch2a_running_std:0", "type": "float32", "shape": [64], "length": 64, "offset": 699392}, {"layer_name": "res2c_branch2b", "weight_name": "res2c_branch2b_W:0", "type": "float32", "shape": [3, 3, 64, 64], "length": 36864, "offset": 699648}, {"layer_name": "res2c_branch2b", "weight_name": "res2c_branch2b_b:0", "type": "float32", "shape": [64], "length": 64, "offset": 847104}, {"layer_name": "bn2c_branch2b", "weight_name": "bn2c_branch2b_gamma:0", "type": "float32", "shape": [64], "length": 64, "offset": 847360}, {"layer_name": "bn2c_branch2b", "weight_name": "bn2c_branch2b_beta:0", "type": "float32", "shape": [64], "length": 64, "offset": 847616}, {"layer_name": "bn2c_branch2b", "weight_name": "bn2c_branch2b_running_mean:0", "type": "float32", "shape": [64], "length": 64, "offset": 847872}, {"layer_name": "bn2c_branch2b", "weight_name": "bn2c_branch2b_running_std:0", "type": "float32", "shape": [64], "length": 64, "offset": 848128}, {"layer_name": "res2c_branch2c", "weight_name": "res2c_branch2c_W:0", "type": "float32", "shape": [1, 1, 64, 256], "length": 16384, "offset": 848384}, {"layer_name": "res2c_branch2c", "weight_name": "res2c_branch2c_b:0", "type": "float32", "shape": [256], "length": 256, "offset": 913920}, {"layer_name": "bn2c_branch2c", "weight_name": "bn2c_branch2c_gamma:0", "type": "float32", "shape": [256], "length": 256, "offset": 914944}, {"layer_name": "bn2c_branch2c", "weight_name": "bn2c_branch2c_beta:0", "type": "float32", "shape": [256], "length": 256, "offset": 915968}, {"layer_name": "bn2c_branch2c", "weight_name": "bn2c_branch2c_running_mean:0", "type": "float32", "shape": [256], "length": 256, "offset": 916992}, {"layer_name": "bn2c_branch2c", "weight_name": "bn2c_branch2c_running_std:0", "type": "float32", "shape": [256], "length": 256, "offset": 918016}, {"layer_name": "res3a_branch2a", "weight_name": "res3a_branch2a_W:0", "type": "float32", "shape": [1, 1, 256, 128], "length": 32768, "offset": 919040}, {"layer_name": "res3a_branch2a", "weight_name": "res3a_branch2a_b:0", "type": "float32", "shape": [128], "length": 128, "offset": 1050112}, {"layer_name": "bn3a_branch2a", "weight_name": "bn3a_branch2a_gamma:0", "type": "float32", "shape": [128], "length": 128, "offset": 1050624}, {"layer_name": "bn3a_branch2a", "weight_name": "bn3a_branch2a_beta:0", "type": "float32", "shape": [128], "length": 128, "offset": 1051136}, {"layer_name": "bn3a_branch2a", "weight_name": "bn3a_branch2a_running_mean:0", "type": "float32", "shape": [128], "length": 128, "offset": 1051648}, {"layer_name": "bn3a_branch2a", "weight_name": "bn3a_branch2a_running_std:0", "type": "float32", "shape": [128], "length": 128, "offset": 1052160}, {"layer_name": "res3a_branch2b", "weight_name": "res3a_branch2b_W:0", "type": "float32", "shape": [3, 3, 128, 128], "length": 147456, "offset": 1052672}, {"layer_name": "res3a_branch2b", "weight_name": "res3a_branch2b_b:0", "type": "float32", "shape": [128], "length": 128, "offset": 1642496}, {"layer_name": "bn3a_branch2b", "weight_name": "bn3a_branch2b_gamma:0", "type": "float32", "shape": [128], "length": 128, "offset": 1643008}, {"layer_name": "bn3a_branch2b", "weight_name": "bn3a_branch2b_beta:0", "type": "float32", "shape": [128], "length": 128, "offset": 1643520}, {"layer_name": "bn3a_branch2b", "weight_name": "bn3a_branch2b_running_mean:0", "type": "float32", "shape": [128], "length": 128, "offset": 1644032}, {"layer_name": "bn3a_branch2b", "weight_name": "bn3a_branch2b_running_std:0", "type": "float32", "shape": [128], "length": 128, "offset": 1644544}, {"layer_name": "res3a_branch2c", "weight_name": "res3a_branch2c_W:0", "type": "float32", "shape": [1, 1, 128, 512], "length": 65536, "offset": 1645056}, {"layer_name": "res3a_branch2c", "weight_name": "res3a_branch2c_b:0", "type": "float32", "shape": [512], "length": 512, "offset": 1907200}, {"layer_name": "res3a_branch1", "weight_name": "res3a_branch1_W:0", "type": "float32", "shape": [1, 1, 256, 512], "length": 131072, "offset": 1909248}, {"layer_name": "res3a_branch1", "weight_name": "res3a_branch1_b:0", "type": "float32", "shape": [512], "length": 512, "offset": 2433536}, {"layer_name": "bn3a_branch2c", "weight_name": "bn3a_branch2c_gamma:0", "type": "float32", "shape": [512], "length": 512, "offset": 2435584}, {"layer_name": "bn3a_branch2c", "weight_name": "bn3a_branch2c_beta:0", "type": "float32", "shape": [512], "length": 512, "offset": 2437632}, {"layer_name": "bn3a_branch2c", "weight_name": "bn3a_branch2c_running_mean:0", "type": "float32", "shape": [512], "length": 512, "offset": 2439680}, {"layer_name": "bn3a_branch2c", "weight_name": "bn3a_branch2c_running_std:0", "type": "float32", "shape": [512], "length": 512, "offset": 2441728}, {"layer_name": "bn3a_branch1", "weight_name": "bn3a_branch1_gamma:0", "type": "float32", "shape": [512], "length": 512, "offset": 2443776}, {"layer_name": "bn3a_branch1", "weight_name": "bn3a_branch1_beta:0", "type": "float32", "shape": [512], "length": 512, "offset": 2445824}, {"layer_name": "bn3a_branch1", "weight_name": "bn3a_branch1_running_mean:0", "type": "float32", "shape": [512], "length": 512, "offset": 2447872}, {"layer_name": "bn3a_branch1", "weight_name": "bn3a_branch1_running_std:0", "type": "float32", "shape": [512], "length": 512, "offset": 2449920}, {"layer_name": "res3b_branch2a", "weight_name": "res3b_branch2a_W:0", "type": "float32", "shape": [1, 1, 512, 128], "length": 65536, "offset": 2451968}, {"layer_name": "res3b_branch2a", "weight_name": "res3b_branch2a_b:0", "type": "float32", "shape": [128], "length": 128, "offset": 2714112}, {"layer_name": "bn3b_branch2a", "weight_name": "bn3b_branch2a_gamma:0", "type": "float32", "shape": [128], "length": 128, "offset": 2714624}, {"layer_name": "bn3b_branch2a", "weight_name": "bn3b_branch2a_beta:0", "type": "float32", "shape": [128], "length": 128, "offset": 2715136}, {"layer_name": "bn3b_branch2a", "weight_name": "bn3b_branch2a_running_mean:0", "type": "float32", "shape": [128], "length": 128, "offset": 2715648}, {"layer_name": "bn3b_branch2a", "weight_name": "bn3b_branch2a_running_std:0", "type": "float32", "shape": [128], "length": 128, "offset": 2716160}, {"layer_name": "res3b_branch2b", "weight_name": "res3b_branch2b_W:0", "type": "float32", "shape": [3, 3, 128, 128], "length": 147456, "offset": 2716672}, {"layer_name": "res3b_branch2b", "weight_name": "res3b_branch2b_b:0", "type": "float32", "shape": [128], "length": 128, "offset": 3306496}, {"layer_name": "bn3b_branch2b", "weight_name": "bn3b_branch2b_gamma:0", "type": "float32", "shape": [128], "length": 128, "offset": 3307008}, {"layer_name": "bn3b_branch2b", "weight_name": "bn3b_branch2b_beta:0", "type": "float32", "shape": [128], "length": 128, "offset": 3307520}, {"layer_name": "bn3b_branch2b", "weight_name": "bn3b_branch2b_running_mean:0", "type": "float32", "shape": [128], "length": 128, "offset": 3308032}, {"layer_name": "bn3b_branch2b", "weight_name": "bn3b_branch2b_running_std:0", "type": "float32", "shape": [128], "length": 128, "offset": 3308544}, {"layer_name": "res3b_branch2c", "weight_name": "res3b_branch2c_W:0", "type": "float32", "shape": [1, 1, 128, 512], "length": 65536, "offset": 3309056}, {"layer_name": "res3b_branch2c", "weight_name": "res3b_branch2c_b:0", "type": "float32", "shape": [512], "length": 512, "offset": 3571200}, {"layer_name": "bn3b_branch2c", "weight_name": "bn3b_branch2c_gamma:0", "type": "float32", "shape": [512], "length": 512, "offset": 3573248}, {"layer_name": "bn3b_branch2c", "weight_name": "bn3b_branch2c_beta:0", "type": "float32", "shape": [512], "length": 512, "offset": 3575296}, {"layer_name": "bn3b_branch2c", "weight_name": "bn3b_branch2c_running_mean:0", "type": "float32", "shape": [512], "length": 512, "offset": 3577344}, {"layer_name": "bn3b_branch2c", "weight_name": "bn3b_branch2c_running_std:0", "type": "float32", "shape": [512], "length": 512, "offset": 3579392}, {"layer_name": "res3c_branch2a", "weight_name": "res3c_branch2a_W:0", "type": "float32", "shape": [1, 1, 512, 128], "length": 65536, "offset": 3581440}, {"layer_name": "res3c_branch2a", "weight_name": "res3c_branch2a_b:0", "type": "float32", "shape": [128], "length": 128, "offset": 3843584}, {"layer_name": "bn3c_branch2a", "weight_name": "bn3c_branch2a_gamma:0", "type": "float32", "shape": [128], "length": 128, "offset": 3844096}, {"layer_name": "bn3c_branch2a", "weight_name": "bn3c_branch2a_beta:0", "type": "float32", "shape": [128], "length": 128, "offset": 3844608}, {"layer_name": "bn3c_branch2a", "weight_name": "bn3c_branch2a_running_mean:0", "type": "float32", "shape": [128], "length": 128, "offset": 3845120}, {"layer_name": "bn3c_branch2a", "weight_name": "bn3c_branch2a_running_std:0", "type": "float32", "shape": [128], "length": 128, "offset": 3845632}, {"layer_name": "res3c_branch2b", "weight_name": "res3c_branch2b_W:0", "type": "float32", "shape": [3, 3, 128, 128], "length": 147456, "offset": 3846144}, {"layer_name": "res3c_branch2b", "weight_name": "res3c_branch2b_b:0", "type": "float32", "shape": [128], "length": 128, "offset": 4435968}, {"layer_name": "bn3c_branch2b", "weight_name": "bn3c_branch2b_gamma:0", "type": "float32", "shape": [128], "length": 128, "offset": 4436480}, {"layer_name": "bn3c_branch2b", "weight_name": "bn3c_branch2b_beta:0", "type": "float32", "shape": [128], "length": 128, "offset": 4436992}, {"layer_name": "bn3c_branch2b", "weight_name": "bn3c_branch2b_running_mean:0", "type": "float32", "shape": [128], "length": 128, "offset": 4437504}, {"layer_name": "bn3c_branch2b", "weight_name": "bn3c_branch2b_running_std:0", "type": "float32", "shape": [128], "length": 128, "offset": 4438016}, {"layer_name": "res3c_branch2c", "weight_name": "res3c_branch2c_W:0", "type": "float32", "shape": [1, 1, 128, 512], "length": 65536, "offset": 4438528}, {"layer_name": "res3c_branch2c", "weight_name": "res3c_branch2c_b:0", "type": "float32", "shape": [512], "length": 512, "offset": 4700672}, {"layer_name": "bn3c_branch2c", "weight_name": "bn3c_branch2c_gamma:0", "type": "float32", "shape": [512], "length": 512, "offset": 4702720}, {"layer_name": "bn3c_branch2c", "weight_name": "bn3c_branch2c_beta:0", "type": "float32", "shape": [512], "length": 512, "offset": 4704768}, {"layer_name": "bn3c_branch2c", "weight_name": "bn3c_branch2c_running_mean:0", "type": "float32", "shape": [512], "length": 512, "offset": 4706816}, {"layer_name": "bn3c_branch2c", "weight_name": "bn3c_branch2c_running_std:0", "type": "float32", "shape": [512], "length": 512, "offset": 4708864}, {"layer_name": "res3d_branch2a", "weight_name": "res3d_branch2a_W:0", "type": "float32", "shape": [1, 1, 512, 128], "length": 65536, "offset": 4710912}, {"layer_name": "res3d_branch2a", "weight_name": "res3d_branch2a_b:0", "type": "float32", "shape": [128], "length": 128, "offset": 4973056}, {"layer_name": "bn3d_branch2a", "weight_name": "bn3d_branch2a_gamma:0", "type": "float32", "shape": [128], "length": 128, "offset": 4973568}, {"layer_name": "bn3d_branch2a", "weight_name": "bn3d_branch2a_beta:0", "type": "float32", "shape": [128], "length": 128, "offset": 4974080}, {"layer_name": "bn3d_branch2a", "weight_name": "bn3d_branch2a_running_mean:0", "type": "float32", "shape": [128], "length": 128, "offset": 4974592}, {"layer_name": "bn3d_branch2a", "weight_name": "bn3d_branch2a_running_std:0", "type": "float32", "shape": [128], "length": 128, "offset": 4975104}, {"layer_name": "res3d_branch2b", "weight_name": "res3d_branch2b_W:0", "type": "float32", "shape": [3, 3, 128, 128], "length": 147456, "offset": 4975616}, {"layer_name": "res3d_branch2b", "weight_name": "res3d_branch2b_b:0", "type": "float32", "shape": [128], "length": 128, "offset": 5565440}, {"layer_name": "bn3d_branch2b", "weight_name": "bn3d_branch2b_gamma:0", "type": "float32", "shape": [128], "length": 128, "offset": 5565952}, {"layer_name": "bn3d_branch2b", "weight_name": "bn3d_branch2b_beta:0", "type": "float32", "shape": [128], "length": 128, "offset": 5566464}, {"layer_name": "bn3d_branch2b", "weight_name": "bn3d_branch2b_running_mean:0", "type": "float32", "shape": [128], "length": 128, "offset": 5566976}, {"layer_name": "bn3d_branch2b", "weight_name": "bn3d_branch2b_running_std:0", "type": "float32", "shape": [128], "length": 128, "offset": 5567488}, {"layer_name": "res3d_branch2c", "weight_name": "res3d_branch2c_W:0", "type": "float32", "shape": [1, 1, 128, 512], "length": 65536, "offset": 5568000}, {"layer_name": "res3d_branch2c", "weight_name": "res3d_branch2c_b:0", "type": "float32", "shape": [512], "length": 512, "offset": 5830144}, {"layer_name": "bn3d_branch2c", "weight_name": "bn3d_branch2c_gamma:0", "type": "float32", "shape": [512], "length": 512, "offset": 5832192}, {"layer_name": "bn3d_branch2c", "weight_name": "bn3d_branch2c_beta:0", "type": "float32", "shape": [512], "length": 512, "offset": 5834240}, {"layer_name": "bn3d_branch2c", "weight_name": "bn3d_branch2c_running_mean:0", "type": "float32", "shape": [512], "length": 512, "offset": 5836288}, {"layer_name": "bn3d_branch2c", "weight_name": "bn3d_branch2c_running_std:0", "type": "float32", "shape": [512], "length": 512, "offset": 5838336}, {"layer_name": "res4a_branch2a", "weight_name": "res4a_branch2a_W:0", "type": "float32", "shape": [1, 1, 512, 256], "length": 131072, "offset": 5840384}, {"layer_name": "res4a_branch2a", "weight_name": "res4a_branch2a_b:0", "type": "float32", "shape": [256], "length": 256, "offset": 6364672}, {"layer_name": "bn4a_branch2a", "weight_name": "bn4a_branch2a_gamma:0", "type": "float32", "shape": [256], "length": 256, "offset": 6365696}, {"layer_name": "bn4a_branch2a", "weight_name": "bn4a_branch2a_beta:0", "type": "float32", "shape": [256], "length": 256, "offset": 6366720}, {"layer_name": "bn4a_branch2a", "weight_name": "bn4a_branch2a_running_mean:0", "type": "float32", "shape": [256], "length": 256, "offset": 6367744}, {"layer_name": "bn4a_branch2a", "weight_name": "bn4a_branch2a_running_std:0", "type": "float32", "shape": [256], "length": 256, "offset": 6368768}, {"layer_name": "res4a_branch2b", "weight_name": "res4a_branch2b_W:0", "type": "float32", "shape": [3, 3, 256, 256], "length": 589824, "offset": 6369792}, {"layer_name": "res4a_branch2b", "weight_name": "res4a_branch2b_b:0", "type": "float32", "shape": [256], "length": 256, "offset": 8729088}, {"layer_name": "bn4a_branch2b", "weight_name": "bn4a_branch2b_gamma:0", "type": "float32", "shape": [256], "length": 256, "offset": 8730112}, {"layer_name": "bn4a_branch2b", "weight_name": "bn4a_branch2b_beta:0", "type": "float32", "shape": [256], "length": 256, "offset": 8731136}, {"layer_name": "bn4a_branch2b", "weight_name": "bn4a_branch2b_running_mean:0", "type": "float32", "shape": [256], "length": 256, "offset": 8732160}, {"layer_name": "bn4a_branch2b", "weight_name": "bn4a_branch2b_running_std:0", "type": "float32", "shape": [256], "length": 256, "offset": 8733184}, {"layer_name": "res4a_branch2c", "weight_name": "res4a_branch2c_W:0", "type": "float32", "shape": [1, 1, 256, 1024], "length": 262144, "offset": 8734208}, {"layer_name": "res4a_branch2c", "weight_name": "res4a_branch2c_b:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 9782784}, {"layer_name": "res4a_branch1", "weight_name": "res4a_branch1_W:0", "type": "float32", "shape": [1, 1, 512, 1024], "length": 524288, "offset": 9786880}, {"layer_name": "res4a_branch1", "weight_name": "res4a_branch1_b:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 11884032}, {"layer_name": "bn4a_branch2c", "weight_name": "bn4a_branch2c_gamma:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 11888128}, {"layer_name": "bn4a_branch2c", "weight_name": "bn4a_branch2c_beta:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 11892224}, {"layer_name": "bn4a_branch2c", "weight_name": "bn4a_branch2c_running_mean:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 11896320}, {"layer_name": "bn4a_branch2c", "weight_name": "bn4a_branch2c_running_std:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 11900416}, {"layer_name": "bn4a_branch1", "weight_name": "bn4a_branch1_gamma:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 11904512}, {"layer_name": "bn4a_branch1", "weight_name": "bn4a_branch1_beta:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 11908608}, {"layer_name": "bn4a_branch1", "weight_name": "bn4a_branch1_running_mean:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 11912704}, {"layer_name": "bn4a_branch1", "weight_name": "bn4a_branch1_running_std:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 11916800}, {"layer_name": "res4b_branch2a", "weight_name": "res4b_branch2a_W:0", "type": "float32", "shape": [1, 1, 1024, 256], "length": 262144, "offset": 11920896}, {"layer_name": "res4b_branch2a", "weight_name": "res4b_branch2a_b:0", "type": "float32", "shape": [256], "length": 256, "offset": 12969472}, {"layer_name": "bn4b_branch2a", "weight_name": "bn4b_branch2a_gamma:0", "type": "float32", "shape": [256], "length": 256, "offset": 12970496}, {"layer_name": "bn4b_branch2a", "weight_name": "bn4b_branch2a_beta:0", "type": "float32", "shape": [256], "length": 256, "offset": 12971520}, {"layer_name": "bn4b_branch2a", "weight_name": "bn4b_branch2a_running_mean:0", "type": "float32", "shape": [256], "length": 256, "offset": 12972544}, {"layer_name": "bn4b_branch2a", "weight_name": "bn4b_branch2a_running_std:0", "type": "float32", "shape": [256], "length": 256, "offset": 12973568}, {"layer_name": "res4b_branch2b", "weight_name": "res4b_branch2b_W:0", "type": "float32", "shape": [3, 3, 256, 256], "length": 589824, "offset": 12974592}, {"layer_name": "res4b_branch2b", "weight_name": "res4b_branch2b_b:0", "type": "float32", "shape": [256], "length": 256, "offset": 15333888}, {"layer_name": "bn4b_branch2b", "weight_name": "bn4b_branch2b_gamma:0", "type": "float32", "shape": [256], "length": 256, "offset": 15334912}, {"layer_name": "bn4b_branch2b", "weight_name": "bn4b_branch2b_beta:0", "type": "float32", "shape": [256], "length": 256, "offset": 15335936}, {"layer_name": "bn4b_branch2b", "weight_name": "bn4b_branch2b_running_mean:0", "type": "float32", "shape": [256], "length": 256, "offset": 15336960}, {"layer_name": "bn4b_branch2b", "weight_name": "bn4b_branch2b_running_std:0", "type": "float32", "shape": [256], "length": 256, "offset": 15337984}, {"layer_name": "res4b_branch2c", "weight_name": "res4b_branch2c_W:0", "type": "float32", "shape": [1, 1, 256, 1024], "length": 262144, "offset": 15339008}, {"layer_name": "res4b_branch2c", "weight_name": "res4b_branch2c_b:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 16387584}, {"layer_name": "bn4b_branch2c", "weight_name": "bn4b_branch2c_gamma:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 16391680}, {"layer_name": "bn4b_branch2c", "weight_name": "bn4b_branch2c_beta:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 16395776}, {"layer_name": "bn4b_branch2c", "weight_name": "bn4b_branch2c_running_mean:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 16399872}, {"layer_name": "bn4b_branch2c", "weight_name": "bn4b_branch2c_running_std:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 16403968}, {"layer_name": "res4c_branch2a", "weight_name": "res4c_branch2a_W:0", "type": "float32", "shape": [1, 1, 1024, 256], "length": 262144, "offset": 16408064}, {"layer_name": "res4c_branch2a", "weight_name": "res4c_branch2a_b:0", "type": "float32", "shape": [256], "length": 256, "offset": 17456640}, {"layer_name": "bn4c_branch2a", "weight_name": "bn4c_branch2a_gamma:0", "type": "float32", "shape": [256], "length": 256, "offset": 17457664}, {"layer_name": "bn4c_branch2a", "weight_name": "bn4c_branch2a_beta:0", "type": "float32", "shape": [256], "length": 256, "offset": 17458688}, {"layer_name": "bn4c_branch2a", "weight_name": "bn4c_branch2a_running_mean:0", "type": "float32", "shape": [256], "length": 256, "offset": 17459712}, {"layer_name": "bn4c_branch2a", "weight_name": "bn4c_branch2a_running_std:0", "type": "float32", "shape": [256], "length": 256, "offset": 17460736}, {"layer_name": "res4c_branch2b", "weight_name": "res4c_branch2b_W:0", "type": "float32", "shape": [3, 3, 256, 256], "length": 589824, "offset": 17461760}, {"layer_name": "res4c_branch2b", "weight_name": "res4c_branch2b_b:0", "type": "float32", "shape": [256], "length": 256, "offset": 19821056}, {"layer_name": "bn4c_branch2b", "weight_name": "bn4c_branch2b_gamma:0", "type": "float32", "shape": [256], "length": 256, "offset": 19822080}, {"layer_name": "bn4c_branch2b", "weight_name": "bn4c_branch2b_beta:0", "type": "float32", "shape": [256], "length": 256, "offset": 19823104}, {"layer_name": "bn4c_branch2b", "weight_name": "bn4c_branch2b_running_mean:0", "type": "float32", "shape": [256], "length": 256, "offset": 19824128}, {"layer_name": "bn4c_branch2b", "weight_name": "bn4c_branch2b_running_std:0", "type": "float32", "shape": [256], "length": 256, "offset": 19825152}, {"layer_name": "res4c_branch2c", "weight_name": "res4c_branch2c_W:0", "type": "float32", "shape": [1, 1, 256, 1024], "length": 262144, "offset": 19826176}, {"layer_name": "res4c_branch2c", "weight_name": "res4c_branch2c_b:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 20874752}, {"layer_name": "bn4c_branch2c", "weight_name": "bn4c_branch2c_gamma:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 20878848}, {"layer_name": "bn4c_branch2c", "weight_name": "bn4c_branch2c_beta:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 20882944}, {"layer_name": "bn4c_branch2c", "weight_name": "bn4c_branch2c_running_mean:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 20887040}, {"layer_name": "bn4c_branch2c", "weight_name": "bn4c_branch2c_running_std:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 20891136}, {"layer_name": "res4d_branch2a", "weight_name": "res4d_branch2a_W:0", "type": "float32", "shape": [1, 1, 1024, 256], "length": 262144, "offset": 20895232}, {"layer_name": "res4d_branch2a", "weight_name": "res4d_branch2a_b:0", "type": "float32", "shape": [256], "length": 256, "offset": 21943808}, {"layer_name": "bn4d_branch2a", "weight_name": "bn4d_branch2a_gamma:0", "type": "float32", "shape": [256], "length": 256, "offset": 21944832}, {"layer_name": "bn4d_branch2a", "weight_name": "bn4d_branch2a_beta:0", "type": "float32", "shape": [256], "length": 256, "offset": 21945856}, {"layer_name": "bn4d_branch2a", "weight_name": "bn4d_branch2a_running_mean:0", "type": "float32", "shape": [256], "length": 256, "offset": 21946880}, {"layer_name": "bn4d_branch2a", "weight_name": "bn4d_branch2a_running_std:0", "type": "float32", "shape": [256], "length": 256, "offset": 21947904}, {"layer_name": "res4d_branch2b", "weight_name": "res4d_branch2b_W:0", "type": "float32", "shape": [3, 3, 256, 256], "length": 589824, "offset": 21948928}, {"layer_name": "res4d_branch2b", "weight_name": "res4d_branch2b_b:0", "type": "float32", "shape": [256], "length": 256, "offset": 24308224}, {"layer_name": "bn4d_branch2b", "weight_name": "bn4d_branch2b_gamma:0", "type": "float32", "shape": [256], "length": 256, "offset": 24309248}, {"layer_name": "bn4d_branch2b", "weight_name": "bn4d_branch2b_beta:0", "type": "float32", "shape": [256], "length": 256, "offset": 24310272}, {"layer_name": "bn4d_branch2b", "weight_name": "bn4d_branch2b_running_mean:0", "type": "float32", "shape": [256], "length": 256, "offset": 24311296}, {"layer_name": "bn4d_branch2b", "weight_name": "bn4d_branch2b_running_std:0", "type": "float32", "shape": [256], "length": 256, "offset": 24312320}, {"layer_name": "res4d_branch2c", "weight_name": "res4d_branch2c_W:0", "type": "float32", "shape": [1, 1, 256, 1024], "length": 262144, "offset": 24313344}, {"layer_name": "res4d_branch2c", "weight_name": "res4d_branch2c_b:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 25361920}, {"layer_name": "bn4d_branch2c", "weight_name": "bn4d_branch2c_gamma:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 25366016}, {"layer_name": "bn4d_branch2c", "weight_name": "bn4d_branch2c_beta:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 25370112}, {"layer_name": "bn4d_branch2c", "weight_name": "bn4d_branch2c_running_mean:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 25374208}, {"layer_name": "bn4d_branch2c", "weight_name": "bn4d_branch2c_running_std:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 25378304}, {"layer_name": "res4e_branch2a", "weight_name": "res4e_branch2a_W:0", "type": "float32", "shape": [1, 1, 1024, 256], "length": 262144, "offset": 25382400}, {"layer_name": "res4e_branch2a", "weight_name": "res4e_branch2a_b:0", "type": "float32", "shape": [256], "length": 256, "offset": 26430976}, {"layer_name": "bn4e_branch2a", "weight_name": "bn4e_branch2a_gamma:0", "type": "float32", "shape": [256], "length": 256, "offset": 26432000}, {"layer_name": "bn4e_branch2a", "weight_name": "bn4e_branch2a_beta:0", "type": "float32", "shape": [256], "length": 256, "offset": 26433024}, {"layer_name": "bn4e_branch2a", "weight_name": "bn4e_branch2a_running_mean:0", "type": "float32", "shape": [256], "length": 256, "offset": 26434048}, {"layer_name": "bn4e_branch2a", "weight_name": "bn4e_branch2a_running_std:0", "type": "float32", "shape": [256], "length": 256, "offset": 26435072}, {"layer_name": "res4e_branch2b", "weight_name": "res4e_branch2b_W:0", "type": "float32", "shape": [3, 3, 256, 256], "length": 589824, "offset": 26436096}, {"layer_name": "res4e_branch2b", "weight_name": "res4e_branch2b_b:0", "type": "float32", "shape": [256], "length": 256, "offset": 28795392}, {"layer_name": "bn4e_branch2b", "weight_name": "bn4e_branch2b_gamma:0", "type": "float32", "shape": [256], "length": 256, "offset": 28796416}, {"layer_name": "bn4e_branch2b", "weight_name": "bn4e_branch2b_beta:0", "type": "float32", "shape": [256], "length": 256, "offset": 28797440}, {"layer_name": "bn4e_branch2b", "weight_name": "bn4e_branch2b_running_mean:0", "type": "float32", "shape": [256], "length": 256, "offset": 28798464}, {"layer_name": "bn4e_branch2b", "weight_name": "bn4e_branch2b_running_std:0", "type": "float32", "shape": [256], "length": 256, "offset": 28799488}, {"layer_name": "res4e_branch2c", "weight_name": "res4e_branch2c_W:0", "type": "float32", "shape": [1, 1, 256, 1024], "length": 262144, "offset": 28800512}, {"layer_name": "res4e_branch2c", "weight_name": "res4e_branch2c_b:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 29849088}, {"layer_name": "bn4e_branch2c", "weight_name": "bn4e_branch2c_gamma:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 29853184}, {"layer_name": "bn4e_branch2c", "weight_name": "bn4e_branch2c_beta:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 29857280}, {"layer_name": "bn4e_branch2c", "weight_name": "bn4e_branch2c_running_mean:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 29861376}, {"layer_name": "bn4e_branch2c", "weight_name": "bn4e_branch2c_running_std:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 29865472}, {"layer_name": "res4f_branch2a", "weight_name": "res4f_branch2a_W:0", "type": "float32", "shape": [1, 1, 1024, 256], "length": 262144, "offset": 29869568}, {"layer_name": "res4f_branch2a", "weight_name": "res4f_branch2a_b:0", "type": "float32", "shape": [256], "length": 256, "offset": 30918144}, {"layer_name": "bn4f_branch2a", "weight_name": "bn4f_branch2a_gamma:0", "type": "float32", "shape": [256], "length": 256, "offset": 30919168}, {"layer_name": "bn4f_branch2a", "weight_name": "bn4f_branch2a_beta:0", "type": "float32", "shape": [256], "length": 256, "offset": 30920192}, {"layer_name": "bn4f_branch2a", "weight_name": "bn4f_branch2a_running_mean:0", "type": "float32", "shape": [256], "length": 256, "offset": 30921216}, {"layer_name": "bn4f_branch2a", "weight_name": "bn4f_branch2a_running_std:0", "type": "float32", "shape": [256], "length": 256, "offset": 30922240}, {"layer_name": "res4f_branch2b", "weight_name": "res4f_branch2b_W:0", "type": "float32", "shape": [3, 3, 256, 256], "length": 589824, "offset": 30923264}, {"layer_name": "res4f_branch2b", "weight_name": "res4f_branch2b_b:0", "type": "float32", "shape": [256], "length": 256, "offset": 33282560}, {"layer_name": "bn4f_branch2b", "weight_name": "bn4f_branch2b_gamma:0", "type": "float32", "shape": [256], "length": 256, "offset": 33283584}, {"layer_name": "bn4f_branch2b", "weight_name": "bn4f_branch2b_beta:0", "type": "float32", "shape": [256], "length": 256, "offset": 33284608}, {"layer_name": "bn4f_branch2b", "weight_name": "bn4f_branch2b_running_mean:0", "type": "float32", "shape": [256], "length": 256, "offset": 33285632}, {"layer_name": "bn4f_branch2b", "weight_name": "bn4f_branch2b_running_std:0", "type": "float32", "shape": [256], "length": 256, "offset": 33286656}, {"layer_name": "res4f_branch2c", "weight_name": "res4f_branch2c_W:0", "type": "float32", "shape": [1, 1, 256, 1024], "length": 262144, "offset": 33287680}, {"layer_name": "res4f_branch2c", "weight_name": "res4f_branch2c_b:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 34336256}, {"layer_name": "bn4f_branch2c", "weight_name": "bn4f_branch2c_gamma:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 34340352}, {"layer_name": "bn4f_branch2c", "weight_name": "bn4f_branch2c_beta:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 34344448}, {"layer_name": "bn4f_branch2c", "weight_name": "bn4f_branch2c_running_mean:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 34348544}, {"layer_name": "bn4f_branch2c", "weight_name": "bn4f_branch2c_running_std:0", "type": "float32", "shape": [1024], "length": 1024, "offset": 34352640}, {"layer_name": "res5a_branch2a", "weight_name": "res5a_branch2a_W:0", "type": "float32", "shape": [1, 1, 1024, 512], "length": 524288, "offset": 34356736}, {"layer_name": "res5a_branch2a", "weight_name": "res5a_branch2a_b:0", "type": "float32", "shape": [512], "length": 512, "offset": 36453888}, {"layer_name": "bn5a_branch2a", "weight_name": "bn5a_branch2a_gamma:0", "type": "float32", "shape": [512], "length": 512, "offset": 36455936}, {"layer_name": "bn5a_branch2a", "weight_name": "bn5a_branch2a_beta:0", "type": "float32", "shape": [512], "length": 512, "offset": 36457984}, {"layer_name": "bn5a_branch2a", "weight_name": "bn5a_branch2a_running_mean:0", "type": "float32", "shape": [512], "length": 512, "offset": 36460032}, {"layer_name": "bn5a_branch2a", "weight_name": "bn5a_branch2a_running_std:0", "type": "float32", "shape": [512], "length": 512, "offset": 36462080}, {"layer_name": "res5a_branch2b", "weight_name": "res5a_branch2b_W:0", "type": "float32", "shape": [3, 3, 512, 512], "length": 2359296, "offset": 36464128}, {"layer_name": "res5a_branch2b", "weight_name": "res5a_branch2b_b:0", "type": "float32", "shape": [512], "length": 512, "offset": 45901312}, {"layer_name": "bn5a_branch2b", "weight_name": "bn5a_branch2b_gamma:0", "type": "float32", "shape": [512], "length": 512, "offset": 45903360}, {"layer_name": "bn5a_branch2b", "weight_name": "bn5a_branch2b_beta:0", "type": "float32", "shape": [512], "length": 512, "offset": 45905408}, {"layer_name": "bn5a_branch2b", "weight_name": "bn5a_branch2b_running_mean:0", "type": "float32", "shape": [512], "length": 512, "offset": 45907456}, {"layer_name": "bn5a_branch2b", "weight_name": "bn5a_branch2b_running_std:0", "type": "float32", "shape": [512], "length": 512, "offset": 45909504}, {"layer_name": "res5a_branch2c", "weight_name": "res5a_branch2c_W:0", "type": "float32", "shape": [1, 1, 512, 2048], "length": 1048576, "offset": 45911552}, {"layer_name": "res5a_branch2c", "weight_name": "res5a_branch2c_b:0", "type": "float32", "shape": [2048], "length": 2048, "offset": 50105856}, {"layer_name": "res5a_branch1", "weight_name": "res5a_branch1_W:0", "type": "float32", "shape": [1, 1, 1024, 2048], "length": 2097152, "offset": 50114048}, {"layer_name": "res5a_branch1", "weight_name": "res5a_branch1_b:0", "type": "float32", "shape": [2048], "length": 2048, "offset": 58502656}, {"layer_name": "bn5a_branch2c", "weight_name": "bn5a_branch2c_gamma:0", "type": "float32", "shape": [2048], "length": 2048, "offset": 58510848}, {"layer_name": "bn5a_branch2c", "weight_name": "bn5a_branch2c_beta:0", "type": "float32", "shape": [2048], "length": 2048, "offset": 58519040}, {"layer_name": "bn5a_branch2c", "weight_name": "bn5a_branch2c_running_mean:0", "type": "float32", "shape": [2048], "length": 2048, "offset": 58527232}, {"layer_name": "bn5a_branch2c", "weight_name": "bn5a_branch2c_running_std:0", "type": "float32", "shape": [2048], "length": 2048, "offset": 58535424}, {"layer_name": "bn5a_branch1", "weight_name": "bn5a_branch1_gamma:0", "type": "float32", "shape": [2048], "length": 2048, "offset": 58543616}, {"layer_name": "bn5a_branch1", "weight_name": "bn5a_branch1_beta:0", "type": "float32", "shape": [2048], "length": 2048, "offset": 58551808}, {"layer_name": "bn5a_branch1", "weight_name": "bn5a_branch1_running_mean:0", "type": "float32", "shape": [2048], "length": 2048, "offset": 58560000}, {"layer_name": "bn5a_branch1", "weight_name": "bn5a_branch1_running_std:0", "type": "float32", "shape": [2048], "length": 2048, "offset": 58568192}, {"layer_name": "res5b_branch2a", "weight_name": "res5b_branch2a_W:0", "type": "float32", "shape": [1, 1, 2048, 512], "length": 1048576, "offset": 58576384}, {"layer_name": "res5b_branch2a", "weight_name": "res5b_branch2a_b:0", "type": "float32", "shape": [512], "length": 512, "offset": 62770688}, {"layer_name": "bn5b_branch2a", "weight_name": "bn5b_branch2a_gamma:0", "type": "float32", "shape": [512], "length": 512, "offset": 62772736}, {"layer_name": "bn5b_branch2a", "weight_name": "bn5b_branch2a_beta:0", "type": "float32", "shape": [512], "length": 512, "offset": 62774784}, {"layer_name": "bn5b_branch2a", "weight_name": "bn5b_branch2a_running_mean:0", "type": "float32", "shape": [512], "length": 512, "offset": 62776832}, {"layer_name": "bn5b_branch2a", "weight_name": "bn5b_branch2a_running_std:0", "type": "float32", "shape": [512], "length": 512, "offset": 62778880}, {"layer_name": "res5b_branch2b", "weight_name": "res5b_branch2b_W:0", "type": "float32", "shape": [3, 3, 512, 512], "length": 2359296, "offset": 62780928}, {"layer_name": "res5b_branch2b", "weight_name": "res5b_branch2b_b:0", "type": "float32", "shape": [512], "length": 512, "offset": 72218112}, {"layer_name": "bn5b_branch2b", "weight_name": "bn5b_branch2b_gamma:0", "type": "float32", "shape": [512], "length": 512, "offset": 72220160}, {"layer_name": "bn5b_branch2b", "weight_name": "bn5b_branch2b_beta:0", "type": "float32", "shape": [512], "length": 512, "offset": 72222208}, {"layer_name": "bn5b_branch2b", "weight_name": "bn5b_branch2b_running_mean:0", "type": "float32", "shape": [512], "length": 512, "offset": 72224256}, {"layer_name": "bn5b_branch2b", "weight_name": "bn5b_branch2b_running_std:0", "type": "float32", "shape": [512], "length": 512, "offset": 72226304}, {"layer_name": "res5b_branch2c", "weight_name": "res5b_branch2c_W:0", "type": "float32", "shape": [1, 1, 512, 2048], "length": 1048576, "offset": 72228352}, {"layer_name": "res5b_branch2c", "weight_name": "res5b_branch2c_b:0", "type": "float32", "shape": [2048], "length": 2048, "offset": 76422656}, {"layer_name": "bn5b_branch2c", "weight_name": "bn5b_branch2c_gamma:0", "type": "float32", "shape": [2048], "length": 2048, "offset": 76430848}, {"layer_name": "bn5b_branch2c", "weight_name": "bn5b_branch2c_beta:0", "type": "float32", "shape": [2048], "length": 2048, "offset": 76439040}, {"layer_name": "bn5b_branch2c", "weight_name": "bn5b_branch2c_running_mean:0", "type": "float32", "shape": [2048], "length": 2048, "offset": 76447232}, {"layer_name": "bn5b_branch2c", "weight_name": "bn5b_branch2c_running_std:0", "type": "float32", "shape": [2048], "length": 2048, "offset": 76455424}, {"layer_name": "res5c_branch2a", "weight_name": "res5c_branch2a_W:0", "type": "float32", "shape": [1, 1, 2048, 512], "length": 1048576, "offset": 76463616}, {"layer_name": "res5c_branch2a", "weight_name": "res5c_branch2a_b:0", "type": "float32", "shape": [512], "length": 512, "offset": 80657920}, {"layer_name": "bn5c_branch2a", "weight_name": "bn5c_branch2a_gamma:0", "type": "float32", "shape": [512], "length": 512, "offset": 80659968}, {"layer_name": "bn5c_branch2a", "weight_name": "bn5c_branch2a_beta:0", "type": "float32", "shape": [512], "length": 512, "offset": 80662016}, {"layer_name": "bn5c_branch2a", "weight_name": "bn5c_branch2a_running_mean:0", "type": "float32", "shape": [512], "length": 512, "offset": 80664064}, {"layer_name": "bn5c_branch2a", "weight_name": "bn5c_branch2a_running_std:0", "type": "float32", "shape": [512], "length": 512, "offset": 80666112}, {"layer_name": "res5c_branch2b", "weight_name": "res5c_branch2b_W:0", "type": "float32", "shape": [3, 3, 512, 512], "length": 2359296, "offset": 80668160}, {"layer_name": "res5c_branch2b", "weight_name": "res5c_branch2b_b:0", "type": "float32", "shape": [512], "length": 512, "offset": 90105344}, {"layer_name": "bn5c_branch2b", "weight_name": "bn5c_branch2b_gamma:0", "type": "float32", "shape": [512], "length": 512, "offset": 90107392}, {"layer_name": "bn5c_branch2b", "weight_name": "bn5c_branch2b_beta:0", "type": "float32", "shape": [512], "length": 512, "offset": 90109440}, {"layer_name": "bn5c_branch2b", "weight_name": "bn5c_branch2b_running_mean:0", "type": "float32", "shape": [512], "length": 512, "offset": 90111488}, {"layer_name": "bn5c_branch2b", "weight_name": "bn5c_branch2b_running_std:0", "type": "float32", "shape": [512], "length": 512, "offset": 90113536}, {"layer_name": "res5c_branch2c", "weight_name": "res5c_branch2c_W:0", "type": "float32", "shape": [1, 1, 512, 2048], "length": 1048576, "offset": 90115584}, {"layer_name": "res5c_branch2c", "weight_name": "res5c_branch2c_b:0", "type": "float32", "shape": [2048], "length": 2048, "offset": 94309888}, {"layer_name": "bn5c_branch2c", "weight_name": "bn5c_branch2c_gamma:0", "type": "float32", "shape": [2048], "length": 2048, "offset": 94318080}, {"layer_name": "bn5c_branch2c", "weight_name": "bn5c_branch2c_beta:0", "type": "float32", "shape": [2048], "length": 2048, "offset": 94326272}, {"layer_name": "bn5c_branch2c", "weight_name": "bn5c_branch2c_running_mean:0", "type": "float32", "shape": [2048], "length": 2048, "offset": 94334464}, {"layer_name": "bn5c_branch2c", "weight_name": "bn5c_branch2c_running_std:0", "type": "float32", "shape": [2048], "length": 2048, "offset": 94342656}, {"layer_name": "fc1000", "weight_name": "fc1000_W:0", "type": "float32", "shape": [2048, 1000], "length": 2048000, "offset": 94350848}, {"layer_name": "fc1000", "weight_name": "fc1000_b:0", "type": "float32", "shape": [1000], "length": 1000, "offset": 102542848}] \ No newline at end of file diff --git a/demos/data/resnet50/resnet50_weights.buf b/demos/data/resnet50/resnet50_weights.buf new file mode 100644 index 0000000..12d8649 --- /dev/null +++ b/demos/data/resnet50/resnet50_weights.buf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7babbf6560d2039699e8c60151c55ebab1f4e9ced204c58603a448311121f80e +size 102546848 diff --git a/demos/notebooks/resnet50.ipynb b/demos/notebooks/resnet50.ipynb new file mode 100644 index 0000000..8fe1314 --- /dev/null +++ b/demos/notebooks/resnet50.ipynb @@ -0,0 +1,111 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 50-layer Residual Network - ImageNet\n", + "\n", + "see **https://github.com/fchollet/keras/blob/master/keras/applications/resnet50.py**" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "WEIGHTS_FILEPATH = 'resnet50.hdf5'\n", + "MODEL_ARCH_FILEPATH = 'resnet50.json'" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Using TensorFlow backend.\n" + ] + } + ], + "source": [ + "from keras.applications import resnet50, imagenet_utils" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Downloading data from https://github.com/fchollet/deep-learning-models/releases/download/v0.2/resnet50_weights_tf_dim_ordering_tf_kernels.h5\n", + "102768640/102853048 [============================>.] - ETA: 0s" + ] + } + ], + "source": [ + "input_shape = (224, 224, 3)\n", + "\n", + "model = resnet50.ResNet50(include_top=True, weights='imagenet')" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "model.save_weights(WEIGHTS_FILEPATH)\n", + "\n", + "with open(MODEL_ARCH_FILEPATH, 'w') as f:\n", + " f.write(model.to_json())" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "anaconda-cloud": {}, + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.5.2" + } + }, + "nbformat": 4, + "nbformat_minor": 1 +} diff --git a/demos/src/resnet50.css b/demos/src/resnet50.css new file mode 100644 index 0000000..067f240 --- /dev/null +++ b/demos/src/resnet50.css @@ -0,0 +1,102 @@ +@import './_variables.css'; + +.demo.resnet50 { + .input-container { + margin: 20px; + position: relative; + + .input-label { + font-family: $font-3; + font-size: 16px; + color: $color-2; + text-align: left; + } + + .image-url { + display: flex; + flex-direction: row; + align-items: center; + justify-content: flex-start; + + span { + margin: 0 10px; + font-family: $font-3; + font-size: 16px; + color: $color-2; + } + } + } + + .column { + display: flex; + align-items: center; + justify-content: center; + } + + .column.input-column { + justify-content: flex-end; + + .canvas-container { + display: inline-flex; + justify-content: flex-end; + + canvas { + background: white; + } + } + } + + .column.controls-column { + align-items: flex-start; + justify-content: flex-start; + padding-top: 20px; + } + + .column.output-column { + justify-content: center; + + .output { + + } + } + + .layer-results-container { + position: relative; + + .layer-result { + position: relative; + z-index: 1; + margin: 30px 20px; + background: white; + border-radius: 10px; + padding: 20px; + overflow-x: auto; + + .layer-result-heading { + font-size: 1rem; + color: #999999; + margin-bottom: 10px; + display: flex; + flex-direction: column; + font-size: 12px; + + span.layer-class { + color: $color-1; + font-size: 14px; + font-weight: bold; + } + } + + .layer-result-canvas-container { + display: inline-flex; + flex-wrap: wrap; + background: white; + + canvas { + border: 1px solid lightgray; + margin: 1px; + } + } + } + } +} diff --git a/demos/src/resnet50.js b/demos/src/resnet50.js new file mode 100644 index 0000000..3d32d12 --- /dev/null +++ b/demos/src/resnet50.js @@ -0,0 +1,129 @@ +/* global Vue */ +import './resnet50.css' + +import * as utils from './utils' + +const MODEL_CONFIG = { + filepaths: { + model: '/demos/data/resnet50/resnet50.json', + weights: '/demos/data/resnet50/resnet50_weights.buf', + metadata: '/demos/data/resnet50/resnet50_metadata.json' + }, + gpu: false +} + +if (process.env.NODE_ENV === 'production') { + Object.assign(MODEL_CONFIG, { + filepaths: { + model: 'demos/data/resnet50/resnet50.json', + weights: 'https://transcranial.github.io/keras-js-demos-data/resnet50/resnet50_weights.buf', + metadata: 'demos/data/resnet50/resnet50_metadata.json' + } + }) +} + +const LAYER_DISPLAY_CONFIG = { +} + +/** + * + * VUE COMPONENT + * + */ +export const ResNet50 = Vue.extend({ + template: require('raw!./resnet50.template.html'), + + data: function () { + return { + model: new KerasJS.Model(MODEL_CONFIG), + modelLoading: true, + imageURL: '', + imageURLSelectList: [ + { name: 'cat', value: 'URL1' }, + { name: 'dog', value: 'URL2' } + ], + input: new Float32Array(224 * 224 * 3), + output: new Float32Array(1000), + layerResultImages: [], + layerDisplayConfig: LAYER_DISPLAY_CONFIG, + useGpu: MODEL_CONFIG.gpu + } + }, + + computed: { + loadingProgress: function () { + return this.model.getLoadingProgress() + } + }, + + created: function () { + // initialize KerasJS model + this.model.initialize() + this.model.ready().then(() => { + this.modelLoading = false + this.getIntermediateResults() + }) + }, + + methods: { + + toggleGpu: function () { + this.model.gpu = !this.useGpu + }, + + getIntermediateResults: function () { + let results = [] + for (let [name, layer] of this.model.modelLayersMap.entries()) { + const layerClass = layer.layerClass || '' + if (layerClass === 'InputLayer') continue + + let images = [] + if (layer.result && layer.result.tensor.shape.length === 3) { + images = utils.unroll3Dtensor(layer.result.tensor) + } else if (layer.result && layer.result.tensor.shape.length === 2) { + images = [utils.image2Dtensor(layer.result.tensor)] + } else if (layer.result && layer.result.tensor.shape.length === 1) { + images = [utils.image1Dtensor(layer.result.tensor)] + } + results.push({ + name, + layerClass, + images + }) + } + this.layerResultImages = results + setTimeout(() => { + this.showIntermediateResults() + }, 0) + }, + + showIntermediateResults: function () { + this.layerResultImages.forEach((result, layerNum) => { + const scalingFactor = this.layerDisplayConfig[result.name].scalingFactor + result.images.forEach((image, imageNum) => { + let ctx = document.getElementById(`intermediate-result-${layerNum}-${imageNum}`).getContext('2d') + ctx.putImageData(image, 0, 0) + let ctxScaled = document.getElementById(`intermediate-result-${layerNum}-${imageNum}-scaled`).getContext('2d') + ctxScaled.save() + ctxScaled.scale(scalingFactor, scalingFactor) + ctxScaled.clearRect(0, 0, ctxScaled.canvas.width, ctxScaled.canvas.height) + ctxScaled.drawImage(document.getElementById(`intermediate-result-${layerNum}-${imageNum}`), 0, 0) + ctxScaled.restore() + }) + }) + }, + + clearIntermediateResults: function () { + this.layerResultImages.forEach((result, layerNum) => { + const scalingFactor = this.layerDisplayConfig[result.name].scalingFactor + result.images.forEach((image, imageNum) => { + let ctxScaled = document.getElementById(`intermediate-result-${layerNum}-${imageNum}-scaled`).getContext('2d') + ctxScaled.save() + ctxScaled.scale(scalingFactor, scalingFactor) + ctxScaled.clearRect(0, 0, ctxScaled.canvas.width, ctxScaled.canvas.height) + ctxScaled.restore() + }) + }) + } + } +})