diff --git a/scripts/release_notes/release_notes.ts b/scripts/release_notes/release_notes.ts index dce9529a3de..122262b819e 100755 --- a/scripts/release_notes/release_notes.ts +++ b/scripts/release_notes/release_notes.ts @@ -61,6 +61,12 @@ const VIS_REPO: Repo = { path: 'tfjs-vis', }; +const RN_REPO: Repo = { + name: 'tfjs-react-native', + identifier: 'tfjs-react-native', + path: 'tfjs-react-native', +}; + async function askUserForVersions(validVersions: string[], packageName: string): Promise<{startVersion: string, endVersion: string}> { const YELLOW_TERMINAL_COLOR = '\x1b[33m%s\x1b[0m'; @@ -135,6 +141,23 @@ async function generateVisNotes() { await generateNotes([VIS_REPO]); } + +async function generateReactNativeNotes() { + // Get start version and end version. + const versions = getTaggedVersions('tfjs-react-native'); + const {startVersion, endVersion} = + await askUserForVersions(versions, 'tfjs-react-native'); + + // Get tfjs-vis start version and end version. + RN_REPO.startVersion = startVersion; + RN_REPO.endVersion = endVersion; + RN_REPO.startCommit = $(`git rev-list -n 1 ${ + getTagName(RN_REPO.identifier, RN_REPO.startVersion)}`); + + await generateNotes([RN_REPO]); +} + + async function generateNotes(repositories: util.Repo[]) { const repoCommits: RepoCommits[] = []; // Clone all of the dependencies into the tmp directory. @@ -217,7 +240,7 @@ parser.addArgument('--project', { help: 'Which project to generate release notes for. One of union|vis. Defaults to union.', defaultValue: 'union', - choices: ['union', 'vis'] + choices: ['union', 'vis', 'rn'] }); const args = parser.parseArgs(); @@ -226,4 +249,6 @@ if (args.project === 'union') { generateTfjsPackageNotes(); } else if (args.project === 'vis') { generateVisNotes(); +} else if (args.project === 'rn') { + generateReactNativeNotes(); } diff --git a/tfjs-react-native/integration_rn59/android/app/build.gradle b/tfjs-react-native/integration_rn59/android/app/build.gradle index ed565dd4e86..c3ea859f7be 100644 --- a/tfjs-react-native/integration_rn59/android/app/build.gradle +++ b/tfjs-react-native/integration_rn59/android/app/build.gradle @@ -36,7 +36,7 @@ import com.android.build.OutputFile * entryFile: "index.android.js", * * // whether to bundle JS and assets in debug mode - * bundleInDebug: false, + * bundleInDebug: false,/ * * // whether to bundle JS and assets in release mode * bundleInRelease: true, @@ -90,7 +90,9 @@ import com.android.build.OutputFile */ project.ext.react = [ - entryFile: "index.js" + entryFile: "index.js", + // Uncomment when using ./gradlew assembleDebug + // bundleInDebug: true, ] apply from: "../../node_modules/react-native/react.gradle" diff --git a/tfjs-react-native/integration_rn59/assets/sharded_model/group1-shard1of2.bin b/tfjs-react-native/integration_rn59/assets/sharded_model/group1-shard1of2.bin new file mode 100644 index 00000000000..d44aa5bcddb Binary files /dev/null and b/tfjs-react-native/integration_rn59/assets/sharded_model/group1-shard1of2.bin differ diff --git a/tfjs-react-native/integration_rn59/assets/sharded_model/group1-shard2of2.bin b/tfjs-react-native/integration_rn59/assets/sharded_model/group1-shard2of2.bin new file mode 100644 index 00000000000..a669f558855 Binary files /dev/null and b/tfjs-react-native/integration_rn59/assets/sharded_model/group1-shard2of2.bin differ diff --git a/tfjs-react-native/integration_rn59/assets/sharded_model/model.json b/tfjs-react-native/integration_rn59/assets/sharded_model/model.json new file mode 100644 index 00000000000..6116da74989 --- /dev/null +++ b/tfjs-react-native/integration_rn59/assets/sharded_model/model.json @@ -0,0 +1,7235 @@ +{ + "weightsManifest": [ + { + "paths": [ + "group1-shard1of2.bin", + "group1-shard2of2.bin" + ], + "weights": [ + { + "dtype": "float32", + "shape": [], + "name": "module_apply_default/hub_input/Mul/y" + }, + { + "dtype": "float32", + "shape": [], + "name": "module_apply_default/hub_input/Sub/y" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 1280, + 1001 + ], + "name": "module/MobilenetV2/Logits/Conv2d_1c_1x1/weights" + }, + { + "dtype": "float32", + "shape": [ + 1001 + ], + "name": "module/MobilenetV2/Logits/Conv2d_1c_1x1/biases" + }, + { + "dtype": "float32", + "shape": [ + 3, + 3, + 3, + 16 + ], + "name": "module/MobilenetV2/Conv/weights" + }, + { + "dtype": "float32", + "shape": [ + 16 + ], + "name": "module_apply_default/MobilenetV2/Conv/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 3, + 3, + 16, + 1 + ], + "name": "module/MobilenetV2/expanded_conv/depthwise/depthwise_weights" + }, + { + "dtype": "float32", + "shape": [ + 16 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv/depthwise/depthwise_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 16, + 8 + ], + "name": "module/MobilenetV2/expanded_conv/project/weights" + }, + { + "dtype": "float32", + "shape": [ + 8 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv/project/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 8, + 48 + ], + "name": "module/MobilenetV2/expanded_conv_1/expand/weights" + }, + { + "dtype": "float32", + "shape": [ + 48 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_1/expand/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 3, + 3, + 48, + 1 + ], + "name": "module/MobilenetV2/expanded_conv_1/depthwise/depthwise_weights" + }, + { + "dtype": "float32", + "shape": [ + 48 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_1/depthwise/depthwise_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 48, + 16 + ], + "name": "module/MobilenetV2/expanded_conv_1/project/weights" + }, + { + "dtype": "float32", + "shape": [ + 16 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_1/project/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 16, + 96 + ], + "name": "module/MobilenetV2/expanded_conv_2/expand/weights" + }, + { + "dtype": "float32", + "shape": [ + 96 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_2/expand/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 3, + 3, + 96, + 1 + ], + "name": "module/MobilenetV2/expanded_conv_2/depthwise/depthwise_weights" + }, + { + "dtype": "float32", + "shape": [ + 96 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_2/depthwise/depthwise_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 96, + 16 + ], + "name": "module/MobilenetV2/expanded_conv_2/project/weights" + }, + { + "dtype": "float32", + "shape": [ + 16 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_2/project/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 16, + 96 + ], + "name": "module/MobilenetV2/expanded_conv_3/expand/weights" + }, + { + "dtype": "float32", + "shape": [ + 96 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_3/expand/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 3, + 3, + 96, + 1 + ], + "name": "module/MobilenetV2/expanded_conv_3/depthwise/depthwise_weights" + }, + { + "dtype": "float32", + "shape": [ + 96 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_3/depthwise/depthwise_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 96, + 16 + ], + "name": "module/MobilenetV2/expanded_conv_3/project/weights" + }, + { + "dtype": "float32", + "shape": [ + 16 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_3/project/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 16, + 96 + ], + "name": "module/MobilenetV2/expanded_conv_4/expand/weights" + }, + { + "dtype": "float32", + "shape": [ + 96 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_4/expand/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 3, + 3, + 96, + 1 + ], + "name": "module/MobilenetV2/expanded_conv_4/depthwise/depthwise_weights" + }, + { + "dtype": "float32", + "shape": [ + 96 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_4/depthwise/depthwise_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 96, + 16 + ], + "name": "module/MobilenetV2/expanded_conv_4/project/weights" + }, + { + "dtype": "float32", + "shape": [ + 16 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_4/project/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 16, + 96 + ], + "name": "module/MobilenetV2/expanded_conv_5/expand/weights" + }, + { + "dtype": "float32", + "shape": [ + 96 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_5/expand/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 3, + 3, + 96, + 1 + ], + "name": "module/MobilenetV2/expanded_conv_5/depthwise/depthwise_weights" + }, + { + "dtype": "float32", + "shape": [ + 96 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_5/depthwise/depthwise_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 96, + 16 + ], + "name": "module/MobilenetV2/expanded_conv_5/project/weights" + }, + { + "dtype": "float32", + "shape": [ + 16 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_5/project/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 16, + 96 + ], + "name": "module/MobilenetV2/expanded_conv_6/expand/weights" + }, + { + "dtype": "float32", + "shape": [ + 96 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_6/expand/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 3, + 3, + 96, + 1 + ], + "name": "module/MobilenetV2/expanded_conv_6/depthwise/depthwise_weights" + }, + { + "dtype": "float32", + "shape": [ + 96 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_6/depthwise/depthwise_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 96, + 32 + ], + "name": "module/MobilenetV2/expanded_conv_6/project/weights" + }, + { + "dtype": "float32", + "shape": [ + 32 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_6/project/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 32, + 192 + ], + "name": "module/MobilenetV2/expanded_conv_7/expand/weights" + }, + { + "dtype": "float32", + "shape": [ + 192 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_7/expand/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 3, + 3, + 192, + 1 + ], + "name": "module/MobilenetV2/expanded_conv_7/depthwise/depthwise_weights" + }, + { + "dtype": "float32", + "shape": [ + 192 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_7/depthwise/depthwise_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 192, + 32 + ], + "name": "module/MobilenetV2/expanded_conv_7/project/weights" + }, + { + "dtype": "float32", + "shape": [ + 32 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_7/project/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 32, + 192 + ], + "name": "module/MobilenetV2/expanded_conv_8/expand/weights" + }, + { + "dtype": "float32", + "shape": [ + 192 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_8/expand/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 3, + 3, + 192, + 1 + ], + "name": "module/MobilenetV2/expanded_conv_8/depthwise/depthwise_weights" + }, + { + "dtype": "float32", + "shape": [ + 192 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_8/depthwise/depthwise_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 192, + 32 + ], + "name": "module/MobilenetV2/expanded_conv_8/project/weights" + }, + { + "dtype": "float32", + "shape": [ + 32 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_8/project/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 32, + 192 + ], + "name": "module/MobilenetV2/expanded_conv_9/expand/weights" + }, + { + "dtype": "float32", + "shape": [ + 192 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_9/expand/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 3, + 3, + 192, + 1 + ], + "name": "module/MobilenetV2/expanded_conv_9/depthwise/depthwise_weights" + }, + { + "dtype": "float32", + "shape": [ + 192 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_9/depthwise/depthwise_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 192, + 32 + ], + "name": "module/MobilenetV2/expanded_conv_9/project/weights" + }, + { + "dtype": "float32", + "shape": [ + 32 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_9/project/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 32, + 192 + ], + "name": "module/MobilenetV2/expanded_conv_10/expand/weights" + }, + { + "dtype": "float32", + "shape": [ + 192 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_10/expand/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 3, + 3, + 192, + 1 + ], + "name": "module/MobilenetV2/expanded_conv_10/depthwise/depthwise_weights" + }, + { + "dtype": "float32", + "shape": [ + 192 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_10/depthwise/depthwise_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 192, + 48 + ], + "name": "module/MobilenetV2/expanded_conv_10/project/weights" + }, + { + "dtype": "float32", + "shape": [ + 48 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_10/project/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 48, + 288 + ], + "name": "module/MobilenetV2/expanded_conv_11/expand/weights" + }, + { + "dtype": "float32", + "shape": [ + 288 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_11/expand/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 3, + 3, + 288, + 1 + ], + "name": "module/MobilenetV2/expanded_conv_11/depthwise/depthwise_weights" + }, + { + "dtype": "float32", + "shape": [ + 288 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_11/depthwise/depthwise_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 288, + 48 + ], + "name": "module/MobilenetV2/expanded_conv_11/project/weights" + }, + { + "dtype": "float32", + "shape": [ + 48 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_11/project/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 48, + 288 + ], + "name": "module/MobilenetV2/expanded_conv_12/expand/weights" + }, + { + "dtype": "float32", + "shape": [ + 288 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_12/expand/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 3, + 3, + 288, + 1 + ], + "name": "module/MobilenetV2/expanded_conv_12/depthwise/depthwise_weights" + }, + { + "dtype": "float32", + "shape": [ + 288 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_12/depthwise/depthwise_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 288, + 48 + ], + "name": "module/MobilenetV2/expanded_conv_12/project/weights" + }, + { + "dtype": "float32", + "shape": [ + 48 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_12/project/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 48, + 288 + ], + "name": "module/MobilenetV2/expanded_conv_13/expand/weights" + }, + { + "dtype": "float32", + "shape": [ + 288 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_13/expand/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 3, + 3, + 288, + 1 + ], + "name": "module/MobilenetV2/expanded_conv_13/depthwise/depthwise_weights" + }, + { + "dtype": "float32", + "shape": [ + 288 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_13/depthwise/depthwise_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 288, + 80 + ], + "name": "module/MobilenetV2/expanded_conv_13/project/weights" + }, + { + "dtype": "float32", + "shape": [ + 80 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_13/project/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 80, + 480 + ], + "name": "module/MobilenetV2/expanded_conv_14/expand/weights" + }, + { + "dtype": "float32", + "shape": [ + 480 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_14/expand/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 3, + 3, + 480, + 1 + ], + "name": "module/MobilenetV2/expanded_conv_14/depthwise/depthwise_weights" + }, + { + "dtype": "float32", + "shape": [ + 480 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_14/depthwise/depthwise_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 480, + 80 + ], + "name": "module/MobilenetV2/expanded_conv_14/project/weights" + }, + { + "dtype": "float32", + "shape": [ + 80 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_14/project/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 80, + 480 + ], + "name": "module/MobilenetV2/expanded_conv_15/expand/weights" + }, + { + "dtype": "float32", + "shape": [ + 480 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_15/expand/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 3, + 3, + 480, + 1 + ], + "name": "module/MobilenetV2/expanded_conv_15/depthwise/depthwise_weights" + }, + { + "dtype": "float32", + "shape": [ + 480 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_15/depthwise/depthwise_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 480, + 80 + ], + "name": "module/MobilenetV2/expanded_conv_15/project/weights" + }, + { + "dtype": "float32", + "shape": [ + 80 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_15/project/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 80, + 480 + ], + "name": "module/MobilenetV2/expanded_conv_16/expand/weights" + }, + { + "dtype": "float32", + "shape": [ + 480 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_16/expand/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 3, + 3, + 480, + 1 + ], + "name": "module/MobilenetV2/expanded_conv_16/depthwise/depthwise_weights" + }, + { + "dtype": "float32", + "shape": [ + 480 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_16/depthwise/depthwise_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 480, + 160 + ], + "name": "module/MobilenetV2/expanded_conv_16/project/weights" + }, + { + "dtype": "float32", + "shape": [ + 160 + ], + "name": "module_apply_default/MobilenetV2/expanded_conv_16/project/Conv2D_bn_offset" + }, + { + "dtype": "float32", + "shape": [ + 1, + 1, + 160, + 1280 + ], + "name": "module/MobilenetV2/Conv_1/weights" + }, + { + "dtype": "float32", + "shape": [ + 1280 + ], + "name": "module_apply_default/MobilenetV2/Conv_1/Conv2D_bn_offset" + } + ] + } + ], + "modelTopology": { + "node": [ + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "shape": { + "shape": { + "dim": [ + { + "size": "-1" + }, + { + "size": "224" + }, + { + "size": "224" + }, + { + "size": "3" + } + ] + } + } + }, + "name": "images", + "op": "Placeholder" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": {} + } + } + }, + "name": "module_apply_default/hub_input/Mul/y", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": {} + } + } + }, + "name": "module_apply_default/hub_input/Sub/y", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "1280" + }, + { + "size": "1001" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/Logits/Conv2d_1c_1x1/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1001" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/Logits/Conv2d_1c_1x1/biases", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "3" + }, + { + "size": "3" + }, + { + "size": "3" + }, + { + "size": "16" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/Conv/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "16" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/Conv/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "3" + }, + { + "size": "3" + }, + { + "size": "16" + }, + { + "size": "1" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv/depthwise/depthwise_weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "16" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv/depthwise/depthwise_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "16" + }, + { + "size": "8" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv/project/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "8" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv/project/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "8" + }, + { + "size": "48" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_1/expand/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "48" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_1/expand/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "3" + }, + { + "size": "3" + }, + { + "size": "48" + }, + { + "size": "1" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_1/depthwise/depthwise_weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "48" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_1/depthwise/depthwise_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "48" + }, + { + "size": "16" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_1/project/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "16" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_1/project/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "16" + }, + { + "size": "96" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_2/expand/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "96" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_2/expand/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "3" + }, + { + "size": "3" + }, + { + "size": "96" + }, + { + "size": "1" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_2/depthwise/depthwise_weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "96" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_2/depthwise/depthwise_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "96" + }, + { + "size": "16" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_2/project/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "16" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_2/project/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "16" + }, + { + "size": "96" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_3/expand/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "96" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_3/expand/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "3" + }, + { + "size": "3" + }, + { + "size": "96" + }, + { + "size": "1" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_3/depthwise/depthwise_weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "96" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_3/depthwise/depthwise_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "96" + }, + { + "size": "16" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_3/project/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "16" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_3/project/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "16" + }, + { + "size": "96" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_4/expand/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "96" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_4/expand/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "3" + }, + { + "size": "3" + }, + { + "size": "96" + }, + { + "size": "1" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_4/depthwise/depthwise_weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "96" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_4/depthwise/depthwise_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "96" + }, + { + "size": "16" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_4/project/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "16" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_4/project/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "16" + }, + { + "size": "96" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_5/expand/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "96" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_5/expand/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "3" + }, + { + "size": "3" + }, + { + "size": "96" + }, + { + "size": "1" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_5/depthwise/depthwise_weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "96" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_5/depthwise/depthwise_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "96" + }, + { + "size": "16" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_5/project/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "16" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_5/project/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "16" + }, + { + "size": "96" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_6/expand/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "96" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_6/expand/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "3" + }, + { + "size": "3" + }, + { + "size": "96" + }, + { + "size": "1" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_6/depthwise/depthwise_weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "96" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_6/depthwise/depthwise_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "96" + }, + { + "size": "32" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_6/project/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "32" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_6/project/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "32" + }, + { + "size": "192" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_7/expand/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "192" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_7/expand/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "3" + }, + { + "size": "3" + }, + { + "size": "192" + }, + { + "size": "1" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_7/depthwise/depthwise_weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "192" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_7/depthwise/depthwise_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "192" + }, + { + "size": "32" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_7/project/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "32" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_7/project/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "32" + }, + { + "size": "192" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_8/expand/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "192" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_8/expand/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "3" + }, + { + "size": "3" + }, + { + "size": "192" + }, + { + "size": "1" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_8/depthwise/depthwise_weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "192" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_8/depthwise/depthwise_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "192" + }, + { + "size": "32" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_8/project/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "32" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_8/project/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "32" + }, + { + "size": "192" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_9/expand/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "192" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_9/expand/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "3" + }, + { + "size": "3" + }, + { + "size": "192" + }, + { + "size": "1" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_9/depthwise/depthwise_weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "192" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_9/depthwise/depthwise_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "192" + }, + { + "size": "32" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_9/project/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "32" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_9/project/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "32" + }, + { + "size": "192" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_10/expand/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "192" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_10/expand/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "3" + }, + { + "size": "3" + }, + { + "size": "192" + }, + { + "size": "1" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_10/depthwise/depthwise_weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "192" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_10/depthwise/depthwise_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "192" + }, + { + "size": "48" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_10/project/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "48" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_10/project/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "48" + }, + { + "size": "288" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_11/expand/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "288" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_11/expand/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "3" + }, + { + "size": "3" + }, + { + "size": "288" + }, + { + "size": "1" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_11/depthwise/depthwise_weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "288" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_11/depthwise/depthwise_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "288" + }, + { + "size": "48" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_11/project/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "48" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_11/project/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "48" + }, + { + "size": "288" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_12/expand/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "288" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_12/expand/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "3" + }, + { + "size": "3" + }, + { + "size": "288" + }, + { + "size": "1" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_12/depthwise/depthwise_weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "288" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_12/depthwise/depthwise_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "288" + }, + { + "size": "48" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_12/project/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "48" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_12/project/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "48" + }, + { + "size": "288" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_13/expand/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "288" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_13/expand/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "3" + }, + { + "size": "3" + }, + { + "size": "288" + }, + { + "size": "1" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_13/depthwise/depthwise_weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "288" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_13/depthwise/depthwise_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "288" + }, + { + "size": "80" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_13/project/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "80" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_13/project/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "80" + }, + { + "size": "480" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_14/expand/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "480" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_14/expand/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "3" + }, + { + "size": "3" + }, + { + "size": "480" + }, + { + "size": "1" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_14/depthwise/depthwise_weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "480" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_14/depthwise/depthwise_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "480" + }, + { + "size": "80" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_14/project/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "80" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_14/project/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "80" + }, + { + "size": "480" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_15/expand/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "480" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_15/expand/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "3" + }, + { + "size": "3" + }, + { + "size": "480" + }, + { + "size": "1" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_15/depthwise/depthwise_weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "480" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_15/depthwise/depthwise_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "480" + }, + { + "size": "80" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_15/project/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "80" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_15/project/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "80" + }, + { + "size": "480" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_16/expand/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "480" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_16/expand/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "3" + }, + { + "size": "3" + }, + { + "size": "480" + }, + { + "size": "1" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_16/depthwise/depthwise_weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "480" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_16/depthwise/depthwise_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "480" + }, + { + "size": "160" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/expanded_conv_16/project/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "160" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_16/project/Conv2D_bn_offset", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1" + }, + { + "size": "1" + }, + { + "size": "160" + }, + { + "size": "1280" + } + ] + } + } + } + }, + "name": "module/MobilenetV2/Conv_1/weights", + "op": "Const" + }, + { + "attr": { + "dtype": { + "type": "DT_FLOAT" + }, + "value": { + "tensor": { + "dtype": "DT_FLOAT", + "tensorShape": { + "dim": [ + { + "size": "1280" + } + ] + } + } + } + }, + "name": "module_apply_default/MobilenetV2/Conv_1/Conv2D_bn_offset", + "op": "Const" + }, + { + "input": [ + "images", + "module_apply_default/hub_input/Mul/y" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/hub_input/Mul", + "op": "Mul" + }, + { + "input": [ + "module_apply_default/hub_input/Mul", + "module_apply_default/hub_input/Sub/y" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/hub_input/Sub", + "op": "Sub" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/hub_input/Sub", + "module/MobilenetV2/Conv/weights", + "module_apply_default/MobilenetV2/Conv/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "2", + "2", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==", + "UmVsdTY=" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/Conv/Relu6", + "op": "_FusedConv2D" + }, + { + "input": [ + "module_apply_default/MobilenetV2/Conv/Relu6", + "module/MobilenetV2/expanded_conv/depthwise/depthwise_weights" + ], + "attr": { + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "T": { + "type": "DT_FLOAT" + }, + "data_format": { + "s": "TkhXQw==" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv/depthwise/depthwise", + "op": "DepthwiseConv2dNative" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv/depthwise/depthwise", + "module_apply_default/MobilenetV2/expanded_conv/depthwise/depthwise_bn_offset" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + }, + "data_format": { + "s": "TkhXQw==" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv/depthwise/BatchNorm/FusedBatchNorm", + "op": "BiasAdd" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv/depthwise/BatchNorm/FusedBatchNorm" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv/depthwise/Relu6", + "op": "Relu6" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv/depthwise/Relu6", + "module/MobilenetV2/expanded_conv/project/weights", + "module_apply_default/MobilenetV2/expanded_conv/project/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv/project/BatchNorm/FusedBatchNorm", + "op": "_FusedConv2D" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv/project/BatchNorm/FusedBatchNorm", + "module/MobilenetV2/expanded_conv_1/expand/weights", + "module_apply_default/MobilenetV2/expanded_conv_1/expand/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==", + "UmVsdTY=" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_1/expand/Relu6", + "op": "_FusedConv2D" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_1/expand/Relu6", + "module/MobilenetV2/expanded_conv_1/depthwise/depthwise_weights" + ], + "attr": { + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "padding": { + "s": "U0FNRQ==" + }, + "data_format": { + "s": "TkhXQw==" + }, + "T": { + "type": "DT_FLOAT" + }, + "strides": { + "list": { + "i": [ + "1", + "2", + "2", + "1" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_1/depthwise/depthwise", + "op": "DepthwiseConv2dNative" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_1/depthwise/depthwise", + "module_apply_default/MobilenetV2/expanded_conv_1/depthwise/depthwise_bn_offset" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + }, + "data_format": { + "s": "TkhXQw==" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_1/depthwise/BatchNorm/FusedBatchNorm", + "op": "BiasAdd" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_1/depthwise/BatchNorm/FusedBatchNorm" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_1/depthwise/Relu6", + "op": "Relu6" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_1/depthwise/Relu6", + "module/MobilenetV2/expanded_conv_1/project/weights", + "module_apply_default/MobilenetV2/expanded_conv_1/project/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_1/project/BatchNorm/FusedBatchNorm", + "op": "_FusedConv2D" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_1/project/BatchNorm/FusedBatchNorm", + "module/MobilenetV2/expanded_conv_2/expand/weights", + "module_apply_default/MobilenetV2/expanded_conv_2/expand/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==", + "UmVsdTY=" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_2/expand/Relu6", + "op": "_FusedConv2D" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_2/expand/Relu6", + "module/MobilenetV2/expanded_conv_2/depthwise/depthwise_weights" + ], + "attr": { + "padding": { + "s": "U0FNRQ==" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "T": { + "type": "DT_FLOAT" + }, + "data_format": { + "s": "TkhXQw==" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_2/depthwise/depthwise", + "op": "DepthwiseConv2dNative" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_2/depthwise/depthwise", + "module_apply_default/MobilenetV2/expanded_conv_2/depthwise/depthwise_bn_offset" + ], + "attr": { + "data_format": { + "s": "TkhXQw==" + }, + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_2/depthwise/BatchNorm/FusedBatchNorm", + "op": "BiasAdd" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_2/depthwise/BatchNorm/FusedBatchNorm" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_2/depthwise/Relu6", + "op": "Relu6" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_2/depthwise/Relu6", + "module/MobilenetV2/expanded_conv_2/project/weights", + "module_apply_default/MobilenetV2/expanded_conv_2/project/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_2/project/BatchNorm/FusedBatchNorm", + "op": "_FusedConv2D" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_1/project/BatchNorm/FusedBatchNorm", + "module_apply_default/MobilenetV2/expanded_conv_2/project/BatchNorm/FusedBatchNorm" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_2/add", + "op": "Add" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_2/add", + "module/MobilenetV2/expanded_conv_3/expand/weights", + "module_apply_default/MobilenetV2/expanded_conv_3/expand/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==", + "UmVsdTY=" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_3/expand/Relu6", + "op": "_FusedConv2D" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_3/expand/Relu6", + "module/MobilenetV2/expanded_conv_3/depthwise/depthwise_weights" + ], + "attr": { + "padding": { + "s": "U0FNRQ==" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "strides": { + "list": { + "i": [ + "1", + "2", + "2", + "1" + ] + } + }, + "T": { + "type": "DT_FLOAT" + }, + "data_format": { + "s": "TkhXQw==" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_3/depthwise/depthwise", + "op": "DepthwiseConv2dNative" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_3/depthwise/depthwise", + "module_apply_default/MobilenetV2/expanded_conv_3/depthwise/depthwise_bn_offset" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + }, + "data_format": { + "s": "TkhXQw==" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_3/depthwise/BatchNorm/FusedBatchNorm", + "op": "BiasAdd" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_3/depthwise/BatchNorm/FusedBatchNorm" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_3/depthwise/Relu6", + "op": "Relu6" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_3/depthwise/Relu6", + "module/MobilenetV2/expanded_conv_3/project/weights", + "module_apply_default/MobilenetV2/expanded_conv_3/project/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_3/project/BatchNorm/FusedBatchNorm", + "op": "_FusedConv2D" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_3/project/BatchNorm/FusedBatchNorm", + "module/MobilenetV2/expanded_conv_4/expand/weights", + "module_apply_default/MobilenetV2/expanded_conv_4/expand/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==", + "UmVsdTY=" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_4/expand/Relu6", + "op": "_FusedConv2D" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_4/expand/Relu6", + "module/MobilenetV2/expanded_conv_4/depthwise/depthwise_weights" + ], + "attr": { + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "data_format": { + "s": "TkhXQw==" + }, + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_4/depthwise/depthwise", + "op": "DepthwiseConv2dNative" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_4/depthwise/depthwise", + "module_apply_default/MobilenetV2/expanded_conv_4/depthwise/depthwise_bn_offset" + ], + "attr": { + "data_format": { + "s": "TkhXQw==" + }, + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_4/depthwise/BatchNorm/FusedBatchNorm", + "op": "BiasAdd" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_4/depthwise/BatchNorm/FusedBatchNorm" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_4/depthwise/Relu6", + "op": "Relu6" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_4/depthwise/Relu6", + "module/MobilenetV2/expanded_conv_4/project/weights", + "module_apply_default/MobilenetV2/expanded_conv_4/project/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_4/project/BatchNorm/FusedBatchNorm", + "op": "_FusedConv2D" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_3/project/BatchNorm/FusedBatchNorm", + "module_apply_default/MobilenetV2/expanded_conv_4/project/BatchNorm/FusedBatchNorm" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_4/add", + "op": "Add" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_4/add", + "module/MobilenetV2/expanded_conv_5/expand/weights", + "module_apply_default/MobilenetV2/expanded_conv_5/expand/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==", + "UmVsdTY=" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_5/expand/Relu6", + "op": "_FusedConv2D" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_5/expand/Relu6", + "module/MobilenetV2/expanded_conv_5/depthwise/depthwise_weights" + ], + "attr": { + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "data_format": { + "s": "TkhXQw==" + }, + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_5/depthwise/depthwise", + "op": "DepthwiseConv2dNative" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_5/depthwise/depthwise", + "module_apply_default/MobilenetV2/expanded_conv_5/depthwise/depthwise_bn_offset" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + }, + "data_format": { + "s": "TkhXQw==" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_5/depthwise/BatchNorm/FusedBatchNorm", + "op": "BiasAdd" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_5/depthwise/BatchNorm/FusedBatchNorm" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_5/depthwise/Relu6", + "op": "Relu6" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_5/depthwise/Relu6", + "module/MobilenetV2/expanded_conv_5/project/weights", + "module_apply_default/MobilenetV2/expanded_conv_5/project/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_5/project/BatchNorm/FusedBatchNorm", + "op": "_FusedConv2D" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_4/add", + "module_apply_default/MobilenetV2/expanded_conv_5/project/BatchNorm/FusedBatchNorm" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_5/add", + "op": "Add" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_5/add", + "module/MobilenetV2/expanded_conv_6/expand/weights", + "module_apply_default/MobilenetV2/expanded_conv_6/expand/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==", + "UmVsdTY=" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_6/expand/Relu6", + "op": "_FusedConv2D" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_6/expand/Relu6", + "module/MobilenetV2/expanded_conv_6/depthwise/depthwise_weights" + ], + "attr": { + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "strides": { + "list": { + "i": [ + "1", + "2", + "2", + "1" + ] + } + }, + "padding": { + "s": "U0FNRQ==" + }, + "T": { + "type": "DT_FLOAT" + }, + "data_format": { + "s": "TkhXQw==" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_6/depthwise/depthwise", + "op": "DepthwiseConv2dNative" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_6/depthwise/depthwise", + "module_apply_default/MobilenetV2/expanded_conv_6/depthwise/depthwise_bn_offset" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + }, + "data_format": { + "s": "TkhXQw==" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_6/depthwise/BatchNorm/FusedBatchNorm", + "op": "BiasAdd" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_6/depthwise/BatchNorm/FusedBatchNorm" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_6/depthwise/Relu6", + "op": "Relu6" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_6/depthwise/Relu6", + "module/MobilenetV2/expanded_conv_6/project/weights", + "module_apply_default/MobilenetV2/expanded_conv_6/project/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_6/project/BatchNorm/FusedBatchNorm", + "op": "_FusedConv2D" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_6/project/BatchNorm/FusedBatchNorm", + "module/MobilenetV2/expanded_conv_7/expand/weights", + "module_apply_default/MobilenetV2/expanded_conv_7/expand/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==", + "UmVsdTY=" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_7/expand/Relu6", + "op": "_FusedConv2D" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_7/expand/Relu6", + "module/MobilenetV2/expanded_conv_7/depthwise/depthwise_weights" + ], + "attr": { + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "data_format": { + "s": "TkhXQw==" + }, + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_7/depthwise/depthwise", + "op": "DepthwiseConv2dNative" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_7/depthwise/depthwise", + "module_apply_default/MobilenetV2/expanded_conv_7/depthwise/depthwise_bn_offset" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + }, + "data_format": { + "s": "TkhXQw==" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_7/depthwise/BatchNorm/FusedBatchNorm", + "op": "BiasAdd" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_7/depthwise/BatchNorm/FusedBatchNorm" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_7/depthwise/Relu6", + "op": "Relu6" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_7/depthwise/Relu6", + "module/MobilenetV2/expanded_conv_7/project/weights", + "module_apply_default/MobilenetV2/expanded_conv_7/project/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_7/project/BatchNorm/FusedBatchNorm", + "op": "_FusedConv2D" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_6/project/BatchNorm/FusedBatchNorm", + "module_apply_default/MobilenetV2/expanded_conv_7/project/BatchNorm/FusedBatchNorm" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_7/add", + "op": "Add" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_7/add", + "module/MobilenetV2/expanded_conv_8/expand/weights", + "module_apply_default/MobilenetV2/expanded_conv_8/expand/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==", + "UmVsdTY=" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_8/expand/Relu6", + "op": "_FusedConv2D" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_8/expand/Relu6", + "module/MobilenetV2/expanded_conv_8/depthwise/depthwise_weights" + ], + "attr": { + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "T": { + "type": "DT_FLOAT" + }, + "data_format": { + "s": "TkhXQw==" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_8/depthwise/depthwise", + "op": "DepthwiseConv2dNative" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_8/depthwise/depthwise", + "module_apply_default/MobilenetV2/expanded_conv_8/depthwise/depthwise_bn_offset" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + }, + "data_format": { + "s": "TkhXQw==" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_8/depthwise/BatchNorm/FusedBatchNorm", + "op": "BiasAdd" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_8/depthwise/BatchNorm/FusedBatchNorm" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_8/depthwise/Relu6", + "op": "Relu6" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_8/depthwise/Relu6", + "module/MobilenetV2/expanded_conv_8/project/weights", + "module_apply_default/MobilenetV2/expanded_conv_8/project/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_8/project/BatchNorm/FusedBatchNorm", + "op": "_FusedConv2D" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_7/add", + "module_apply_default/MobilenetV2/expanded_conv_8/project/BatchNorm/FusedBatchNorm" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_8/add", + "op": "Add" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_8/add", + "module/MobilenetV2/expanded_conv_9/expand/weights", + "module_apply_default/MobilenetV2/expanded_conv_9/expand/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==", + "UmVsdTY=" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_9/expand/Relu6", + "op": "_FusedConv2D" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_9/expand/Relu6", + "module/MobilenetV2/expanded_conv_9/depthwise/depthwise_weights" + ], + "attr": { + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "padding": { + "s": "U0FNRQ==" + }, + "data_format": { + "s": "TkhXQw==" + }, + "T": { + "type": "DT_FLOAT" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_9/depthwise/depthwise", + "op": "DepthwiseConv2dNative" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_9/depthwise/depthwise", + "module_apply_default/MobilenetV2/expanded_conv_9/depthwise/depthwise_bn_offset" + ], + "attr": { + "data_format": { + "s": "TkhXQw==" + }, + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_9/depthwise/BatchNorm/FusedBatchNorm", + "op": "BiasAdd" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_9/depthwise/BatchNorm/FusedBatchNorm" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_9/depthwise/Relu6", + "op": "Relu6" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_9/depthwise/Relu6", + "module/MobilenetV2/expanded_conv_9/project/weights", + "module_apply_default/MobilenetV2/expanded_conv_9/project/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_9/project/BatchNorm/FusedBatchNorm", + "op": "_FusedConv2D" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_8/add", + "module_apply_default/MobilenetV2/expanded_conv_9/project/BatchNorm/FusedBatchNorm" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_9/add", + "op": "Add" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_9/add", + "module/MobilenetV2/expanded_conv_10/expand/weights", + "module_apply_default/MobilenetV2/expanded_conv_10/expand/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==", + "UmVsdTY=" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_10/expand/Relu6", + "op": "_FusedConv2D" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_10/expand/Relu6", + "module/MobilenetV2/expanded_conv_10/depthwise/depthwise_weights" + ], + "attr": { + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "padding": { + "s": "U0FNRQ==" + }, + "data_format": { + "s": "TkhXQw==" + }, + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_10/depthwise/depthwise", + "op": "DepthwiseConv2dNative" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_10/depthwise/depthwise", + "module_apply_default/MobilenetV2/expanded_conv_10/depthwise/depthwise_bn_offset" + ], + "attr": { + "data_format": { + "s": "TkhXQw==" + }, + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_10/depthwise/BatchNorm/FusedBatchNorm", + "op": "BiasAdd" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_10/depthwise/BatchNorm/FusedBatchNorm" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_10/depthwise/Relu6", + "op": "Relu6" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_10/depthwise/Relu6", + "module/MobilenetV2/expanded_conv_10/project/weights", + "module_apply_default/MobilenetV2/expanded_conv_10/project/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_10/project/BatchNorm/FusedBatchNorm", + "op": "_FusedConv2D" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_10/project/BatchNorm/FusedBatchNorm", + "module/MobilenetV2/expanded_conv_11/expand/weights", + "module_apply_default/MobilenetV2/expanded_conv_11/expand/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==", + "UmVsdTY=" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_11/expand/Relu6", + "op": "_FusedConv2D" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_11/expand/Relu6", + "module/MobilenetV2/expanded_conv_11/depthwise/depthwise_weights" + ], + "attr": { + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "padding": { + "s": "U0FNRQ==" + }, + "data_format": { + "s": "TkhXQw==" + }, + "T": { + "type": "DT_FLOAT" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_11/depthwise/depthwise", + "op": "DepthwiseConv2dNative" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_11/depthwise/depthwise", + "module_apply_default/MobilenetV2/expanded_conv_11/depthwise/depthwise_bn_offset" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + }, + "data_format": { + "s": "TkhXQw==" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_11/depthwise/BatchNorm/FusedBatchNorm", + "op": "BiasAdd" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_11/depthwise/BatchNorm/FusedBatchNorm" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_11/depthwise/Relu6", + "op": "Relu6" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_11/depthwise/Relu6", + "module/MobilenetV2/expanded_conv_11/project/weights", + "module_apply_default/MobilenetV2/expanded_conv_11/project/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_11/project/BatchNorm/FusedBatchNorm", + "op": "_FusedConv2D" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_10/project/BatchNorm/FusedBatchNorm", + "module_apply_default/MobilenetV2/expanded_conv_11/project/BatchNorm/FusedBatchNorm" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_11/add", + "op": "Add" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_11/add", + "module/MobilenetV2/expanded_conv_12/expand/weights", + "module_apply_default/MobilenetV2/expanded_conv_12/expand/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==", + "UmVsdTY=" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_12/expand/Relu6", + "op": "_FusedConv2D" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_12/expand/Relu6", + "module/MobilenetV2/expanded_conv_12/depthwise/depthwise_weights" + ], + "attr": { + "padding": { + "s": "U0FNRQ==" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "T": { + "type": "DT_FLOAT" + }, + "data_format": { + "s": "TkhXQw==" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_12/depthwise/depthwise", + "op": "DepthwiseConv2dNative" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_12/depthwise/depthwise", + "module_apply_default/MobilenetV2/expanded_conv_12/depthwise/depthwise_bn_offset" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + }, + "data_format": { + "s": "TkhXQw==" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_12/depthwise/BatchNorm/FusedBatchNorm", + "op": "BiasAdd" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_12/depthwise/BatchNorm/FusedBatchNorm" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_12/depthwise/Relu6", + "op": "Relu6" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_12/depthwise/Relu6", + "module/MobilenetV2/expanded_conv_12/project/weights", + "module_apply_default/MobilenetV2/expanded_conv_12/project/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_12/project/BatchNorm/FusedBatchNorm", + "op": "_FusedConv2D" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_11/add", + "module_apply_default/MobilenetV2/expanded_conv_12/project/BatchNorm/FusedBatchNorm" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_12/add", + "op": "Add" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_12/add", + "module/MobilenetV2/expanded_conv_13/expand/weights", + "module_apply_default/MobilenetV2/expanded_conv_13/expand/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==", + "UmVsdTY=" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_13/expand/Relu6", + "op": "_FusedConv2D" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_13/expand/Relu6", + "module/MobilenetV2/expanded_conv_13/depthwise/depthwise_weights" + ], + "attr": { + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "2", + "2", + "1" + ] + } + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "data_format": { + "s": "TkhXQw==" + }, + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_13/depthwise/depthwise", + "op": "DepthwiseConv2dNative" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_13/depthwise/depthwise", + "module_apply_default/MobilenetV2/expanded_conv_13/depthwise/depthwise_bn_offset" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + }, + "data_format": { + "s": "TkhXQw==" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_13/depthwise/BatchNorm/FusedBatchNorm", + "op": "BiasAdd" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_13/depthwise/BatchNorm/FusedBatchNorm" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_13/depthwise/Relu6", + "op": "Relu6" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_13/depthwise/Relu6", + "module/MobilenetV2/expanded_conv_13/project/weights", + "module_apply_default/MobilenetV2/expanded_conv_13/project/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_13/project/BatchNorm/FusedBatchNorm", + "op": "_FusedConv2D" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_13/project/BatchNorm/FusedBatchNorm", + "module/MobilenetV2/expanded_conv_14/expand/weights", + "module_apply_default/MobilenetV2/expanded_conv_14/expand/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==", + "UmVsdTY=" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_14/expand/Relu6", + "op": "_FusedConv2D" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_14/expand/Relu6", + "module/MobilenetV2/expanded_conv_14/depthwise/depthwise_weights" + ], + "attr": { + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "padding": { + "s": "U0FNRQ==" + }, + "data_format": { + "s": "TkhXQw==" + }, + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_14/depthwise/depthwise", + "op": "DepthwiseConv2dNative" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_14/depthwise/depthwise", + "module_apply_default/MobilenetV2/expanded_conv_14/depthwise/depthwise_bn_offset" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + }, + "data_format": { + "s": "TkhXQw==" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_14/depthwise/BatchNorm/FusedBatchNorm", + "op": "BiasAdd" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_14/depthwise/BatchNorm/FusedBatchNorm" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_14/depthwise/Relu6", + "op": "Relu6" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_14/depthwise/Relu6", + "module/MobilenetV2/expanded_conv_14/project/weights", + "module_apply_default/MobilenetV2/expanded_conv_14/project/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_14/project/BatchNorm/FusedBatchNorm", + "op": "_FusedConv2D" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_13/project/BatchNorm/FusedBatchNorm", + "module_apply_default/MobilenetV2/expanded_conv_14/project/BatchNorm/FusedBatchNorm" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_14/add", + "op": "Add" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_14/add", + "module/MobilenetV2/expanded_conv_15/expand/weights", + "module_apply_default/MobilenetV2/expanded_conv_15/expand/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==", + "UmVsdTY=" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_15/expand/Relu6", + "op": "_FusedConv2D" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_15/expand/Relu6", + "module/MobilenetV2/expanded_conv_15/depthwise/depthwise_weights" + ], + "attr": { + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "data_format": { + "s": "TkhXQw==" + }, + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_15/depthwise/depthwise", + "op": "DepthwiseConv2dNative" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_15/depthwise/depthwise", + "module_apply_default/MobilenetV2/expanded_conv_15/depthwise/depthwise_bn_offset" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + }, + "data_format": { + "s": "TkhXQw==" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_15/depthwise/BatchNorm/FusedBatchNorm", + "op": "BiasAdd" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_15/depthwise/BatchNorm/FusedBatchNorm" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_15/depthwise/Relu6", + "op": "Relu6" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_15/depthwise/Relu6", + "module/MobilenetV2/expanded_conv_15/project/weights", + "module_apply_default/MobilenetV2/expanded_conv_15/project/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_15/project/BatchNorm/FusedBatchNorm", + "op": "_FusedConv2D" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_14/add", + "module_apply_default/MobilenetV2/expanded_conv_15/project/BatchNorm/FusedBatchNorm" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_15/add", + "op": "Add" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_15/add", + "module/MobilenetV2/expanded_conv_16/expand/weights", + "module_apply_default/MobilenetV2/expanded_conv_16/expand/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==", + "UmVsdTY=" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_16/expand/Relu6", + "op": "_FusedConv2D" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_16/expand/Relu6", + "module/MobilenetV2/expanded_conv_16/depthwise/depthwise_weights" + ], + "attr": { + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "data_format": { + "s": "TkhXQw==" + }, + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_16/depthwise/depthwise", + "op": "DepthwiseConv2dNative" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_16/depthwise/depthwise", + "module_apply_default/MobilenetV2/expanded_conv_16/depthwise/depthwise_bn_offset" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + }, + "data_format": { + "s": "TkhXQw==" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_16/depthwise/BatchNorm/FusedBatchNorm", + "op": "BiasAdd" + }, + { + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_16/depthwise/BatchNorm/FusedBatchNorm" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_16/depthwise/Relu6", + "op": "Relu6" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_16/depthwise/Relu6", + "module/MobilenetV2/expanded_conv_16/project/weights", + "module_apply_default/MobilenetV2/expanded_conv_16/project/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/expanded_conv_16/project/BatchNorm/FusedBatchNorm", + "op": "_FusedConv2D" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/expanded_conv_16/project/BatchNorm/FusedBatchNorm", + "module/MobilenetV2/Conv_1/weights", + "module_apply_default/MobilenetV2/Conv_1/Conv2D_bn_offset" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==", + "UmVsdTY=" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/Conv_1/Relu6", + "op": "_FusedConv2D" + }, + { + "input": [ + "module_apply_default/MobilenetV2/Conv_1/Relu6" + ], + "attr": { + "padding": { + "s": "VkFMSUQ=" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "ksize": { + "list": { + "i": [ + "1", + "7", + "7", + "1" + ] + } + }, + "T": { + "type": "DT_FLOAT" + }, + "data_format": { + "s": "TkhXQw==" + } + }, + "name": "module_apply_default/MobilenetV2/Logits/AvgPool", + "op": "AvgPool" + }, + { + "device": "/device:CPU:0", + "input": [ + "module_apply_default/MobilenetV2/Logits/AvgPool", + "module/MobilenetV2/Logits/Conv2d_1c_1x1/weights", + "module/MobilenetV2/Logits/Conv2d_1c_1x1/biases" + ], + "attr": { + "explicit_paddings": { + "list": {} + }, + "epsilon": { + "f": 0 + }, + "data_format": { + "s": "TkhXQw==" + }, + "use_cudnn_on_gpu": { + "b": true + }, + "padding": { + "s": "U0FNRQ==" + }, + "strides": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "num_args": { + "i": "1" + }, + "T": { + "type": "DT_FLOAT" + }, + "dilations": { + "list": { + "i": [ + "1", + "1", + "1", + "1" + ] + } + }, + "fused_ops": { + "list": { + "s": [ + "Qmlhc0FkZA==" + ] + } + } + }, + "name": "module_apply_default/MobilenetV2/Logits/Conv2d_1c_1x1/BiasAdd", + "op": "_FusedConv2D" + }, + { + "input": [ + "module_apply_default/MobilenetV2/Logits/Conv2d_1c_1x1/BiasAdd" + ], + "attr": { + "squeeze_dims": { + "list": { + "i": [ + "1", + "2" + ] + } + }, + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/Logits/Squeeze", + "op": "Squeeze" + }, + { + "input": [ + "module_apply_default/MobilenetV2/Logits/Squeeze" + ], + "attr": { + "T": { + "type": "DT_FLOAT" + } + }, + "name": "module_apply_default/MobilenetV2/Logits/output", + "op": "Identity" + } + ], + "library": {}, + "versions": {} + }, + "generatedBy": "1.14.0", + "convertedBy": "TensorFlow.js Converter v1.2.10.1", + "format": "graph-model" +} diff --git a/tfjs-react-native/integration_rn59/assets/sharded_model/readme.md b/tfjs-react-native/integration_rn59/assets/sharded_model/readme.md new file mode 100644 index 00000000000..2a0e35a1311 --- /dev/null +++ b/tfjs-react-native/integration_rn59/assets/sharded_model/readme.md @@ -0,0 +1 @@ +Assets downloaded from https://tfhub.dev/google/tfjs-model/imagenet/mobilenet_v2_050_224/classification/2/default/1 diff --git a/tfjs-react-native/integration_rn59/components/diagnostic.tsx b/tfjs-react-native/integration_rn59/components/diagnostic.tsx index 68f9264788f..31997f603b7 100644 --- a/tfjs-react-native/integration_rn59/components/diagnostic.tsx +++ b/tfjs-react-native/integration_rn59/components/diagnostic.tsx @@ -20,7 +20,7 @@ import { Button, SafeAreaView, StyleSheet, ScrollView, View, StatusBar } from 'r import * as tf from '@tensorflow/tfjs'; import { Run } from './run'; -import { simpleOpRunner, precisionTestRunner, mobilenetRunner, localModelRunner, trainModelRunner, saveModelRunner, localGraphModelRunner } from './ml'; +import { simpleOpRunner, precisionTestRunner, mobilenetRunner, localModelRunner, localShardedGraphModelRunner, trainModelRunner, saveModelRunner, localGraphModelRunner } from './ml'; interface ScreenProps { returnToMain: () => void; @@ -79,6 +79,8 @@ export class Diagnostic extends React.Component { getRunner={localModelRunner} numRuns={1}> + { @@ -93,6 +93,28 @@ export async function localGraphModelRunner() { }; } +/** + * A runner that loads a sharded model bundled with the app and runs a + * prediction through it. + */ +const shardedModelJson = require('../assets/sharded_model/model.json'); +const shardedModelWeights1: number = + require('../assets/sharded_model/group1-shard1of2.bin'); +const shardedModelWeights2: number = + require('../assets/sharded_model/group1-shard2of2.bin'); + +export async function localShardedGraphModelRunner() { + const model = await tf.loadGraphModel(bundleResourceIO( + shardedModelJson, [shardedModelWeights1, shardedModelWeights2])); + + return async () => { + const input = tf.zeros([1, 224, 224, 3]); + const res = model.predict(input) as tf.Tensor; + const data = await res.data(); + return JSON.stringify({predictionsLength: data.length}); + }; +} + /** * A runner that traines a model. */ diff --git a/tfjs-react-native/integration_rn59/package.json b/tfjs-react-native/integration_rn59/package.json index 430d0fd160a..f777944c80b 100644 --- a/tfjs-react-native/integration_rn59/package.json +++ b/tfjs-react-native/integration_rn59/package.json @@ -22,7 +22,7 @@ "@tensorflow-models/mobilenet": "^2.0.4", "@tensorflow-models/posenet": "^2.2.1", "@tensorflow/tfjs": "2.6.0", - "@tensorflow/tfjs-react-native": "0.3.0", + "@tensorflow/tfjs-react-native": "0.4.0", "expo-camera": "^7.0.0", "expo-gl": "^7.0.0", "expo-gl-cpp": "^7.0.0", diff --git a/tfjs-react-native/integration_rn59/yarn.lock b/tfjs-react-native/integration_rn59/yarn.lock index 0053f106755..21a4497c147 100644 --- a/tfjs-react-native/integration_rn59/yarn.lock +++ b/tfjs-react-native/integration_rn59/yarn.lock @@ -913,10 +913,10 @@ resolved "https://registry.yarnpkg.com/@tensorflow/tfjs-layers/-/tfjs-layers-2.6.0.tgz#fed57ff6514f3fbb78fbcd2d40a09e9bd8d52cfc" integrity sha512-nU9WNSGpEU6GzKo5bvJBMa/OZRe1bR5Z2W6T0XiEY8CBiPNS+oJFJNm0NY8kQj/WnDS0Hfue38P46q7gV/9XMA== -"@tensorflow/tfjs-react-native@0.3.0": - version "0.3.0" - resolved "https://registry.yarnpkg.com/@tensorflow/tfjs-react-native/-/tfjs-react-native-0.3.0.tgz#aa8c4c05314b3c73e78d76a14c7868b61569524f" - integrity sha512-4Nb/KBRDs8CCAWIUp+FxNzMJJPL6fi1+oG7rY+357TaHx+4OKwZcKOZacmyPOvTS5Bn679QMmv+jANjbLiBkLA== +"@tensorflow/tfjs-react-native@0.4.0": + version "0.4.0" + resolved "https://registry.yarnpkg.com/@tensorflow/tfjs-react-native/-/tfjs-react-native-0.4.0.tgz#75b32428104fad0d078d1db5c3fd479c828ffd96" + integrity sha512-Bfo7wAGOJXQxm7Lz4ss53089kwXivBicWXqfhCpPKY5Z17GAE8CeChRA+pkzrhAMk8GrJTYte1Cn9Gi739FDaw== dependencies: base64-js "^1.3.0" buffer "^5.2.1" diff --git a/tfjs-react-native/src/bundle_resource_io.ts b/tfjs-react-native/src/bundle_resource_io.ts index 457794d5f4c..6ebf40ca285 100644 --- a/tfjs-react-native/src/bundle_resource_io.ts +++ b/tfjs-react-native/src/bundle_resource_io.ts @@ -24,16 +24,11 @@ import {fetch} from './platform_react_native'; class BundleResourceHandler implements io.IOHandler { constructor( protected readonly modelJson: io.ModelJSON, - protected readonly modelWeightsId: string|number) { + protected readonly modelWeightsId: Array) { if (modelJson == null || modelWeightsId == null) { throw new Error( 'Must pass the model json object and the model weights path.'); } - if (Array.isArray(modelWeightsId)) { - throw new Error( - 'Bundle resource IO handler does not currently support loading ' + - 'sharded weights'); - } } /** @@ -56,43 +51,38 @@ class BundleResourceHandler implements io.IOHandler { * @returns The loaded model (if loading succeeds). */ async load(): Promise { - const modelJson = this.modelJson; - - if (modelJson.weightsManifest.length > 1) { - throw new Error( - 'Bundle resource IO handler does not currently support loading ' + - 'sharded weights and the modelJson indicates that this model has ' + - 'sharded weights (more than one weights file).'); - } - - const weightsAsset = Asset.fromModule(this.modelWeightsId); - if (weightsAsset.uri.match('^http')) { + const weightsAssets = this.modelWeightsId.map(id => Asset.fromModule(id)); + if (weightsAssets[0].uri.match('^http')) { // In debug/dev mode RN will serve these assets over HTTP - return this.loadViaHttp(weightsAsset); + return this.loadViaHttp(weightsAssets); } else { // In release mode the assets will be on the file system. - return this.loadLocalAsset(weightsAsset); + return this.loadLocalAsset(weightsAssets); } } - async loadViaHttp(weightsAsset: Asset): Promise { + async loadViaHttp(weightsAssets: Asset[]): Promise { const modelJson = this.modelJson; - - // Load the weights - const url = weightsAsset.uri; - const requestInit: undefined = undefined; - const response = await fetch(url, requestInit, {isBinary: true}); - const weightData = await response.arrayBuffer(); - const modelArtifacts: io.ModelArtifacts = Object.assign({}, modelJson); modelArtifacts.weightSpecs = modelJson.weightsManifest[0].weights; //@ts-ignore delete modelArtifacts.weightManifest; - modelArtifacts.weightData = weightData; + + // Load the weights + const weightsDataArray = + await Promise.all(weightsAssets.map(async (weightAsset) => { + const url = weightAsset.uri; + const requestInit: undefined = undefined; + const response = await fetch(url, requestInit, {isBinary: true}); + const weightData = await response.arrayBuffer(); + return weightData; + })); + + modelArtifacts.weightData = io.concatenateArrayBuffers(weightsDataArray); return modelArtifacts; } - async loadLocalAsset(weightsAsset: Asset): Promise { + async loadLocalAsset(weightsAssets: Asset[]): Promise { // Use a dynamic import here because react-native-fs is not compatible // with managed expo workflow. However the managed expo workflow should // never hit this code path. @@ -101,36 +91,42 @@ class BundleResourceHandler implements io.IOHandler { const RNFS = require('react-native-fs'); const modelJson = this.modelJson; - - let base64Weights: string; - if (Platform.OS === 'android') { - // On android we get a resource id instead of a regular path. We need - // to load the weights from the res/raw folder using this id. - const fileName = `${weightsAsset.uri}.${weightsAsset.type}`; - try { - base64Weights = await RNFS.readFileRes(fileName, 'base64'); - } catch (e) { - throw new Error( - `Error reading resource ${fileName}. Make sure the file is - in located in the res/raw folder of the bundle`, - ); - } - } else { - try { - base64Weights = await RNFS.readFile(weightsAsset.uri, 'base64'); - } catch (e) { - throw new Error( - `Error reading resource ${weightsAsset.uri}.`, - ); - } - } - - const weightData = util.encodeString(base64Weights, 'base64').buffer; const modelArtifacts: io.ModelArtifacts = Object.assign({}, modelJson); modelArtifacts.weightSpecs = modelJson.weightsManifest[0].weights; //@ts-ignore delete modelArtifacts.weightManifest; - modelArtifacts.weightData = weightData; + + // Load the weights + const weightsDataArray = + await Promise.all(weightsAssets.map(async (weightsAsset) => { + let base64Weights: string; + if (Platform.OS === 'android') { + // On android we get a resource id instead of a regular path. We + // need to load the weights from the res/raw folder using this id. + const fileName = `${weightsAsset.uri}.${weightsAsset.type}`; + try { + base64Weights = await RNFS.readFileRes(fileName, 'base64'); + } catch (e) { + throw new Error( + `Error reading resource ${fileName}. Make sure the file is + in located in the res/raw folder of the bundle`, + ); + } + } else { + try { + base64Weights = await RNFS.readFile(weightsAsset.uri, 'base64'); + } catch (e) { + throw new Error( + `Error reading resource ${weightsAsset.uri}.`, + ); + } + } + + const weightData = util.encodeString(base64Weights, 'base64').buffer; + return weightData; + })); + + modelArtifacts.weightData = io.concatenateArrayBuffers(weightsDataArray); return modelArtifacts; } } @@ -156,9 +152,10 @@ class BundleResourceHandler implements io.IOHandler { * ``` * * @param modelJson The JSON object for the serialized model. - * @param modelWeightsId An identifier for the model weights file. This is + * @param modelWeightsId Identifier(s) for the model's weights files. This is * generally a resourceId or a path to the resource in the app package. - * This is typically obtained with a `require` statement. + * This is typically obtained with a `require` statement. Can also be an array + * of such ids if the model has multiple shards. * * See * facebook.github.io/react-native/docs/images#static-non-image-resources @@ -170,17 +167,19 @@ class BundleResourceHandler implements io.IOHandler { * @doc {heading: 'Models', subheading: 'IOHandlers'} */ export function bundleResourceIO( - modelJson: io.ModelJSON, modelWeightsId: number): io.IOHandler { + modelJson: io.ModelJSON, modelWeightsId: number|number[]): io.IOHandler { if (typeof modelJson !== 'object') { throw new Error( 'modelJson must be a JavaScript object (and not a string).\n' + 'Have you wrapped yor asset path in a require() statment?'); } - if (typeof modelWeightsId !== 'number') { + if (typeof modelWeightsId === 'string') { throw new Error( - 'modelWeightsID must be a number.\n' + - 'Have you wrapped yor asset path in a require() statment?'); + 'modelWeightsID must be a number or number array.\n' + + 'Have you wrapped yor asset paths in a require() statements?'); } - return new BundleResourceHandler(modelJson, modelWeightsId); + const modelWeightsIdArr = + Array.isArray(modelWeightsId) ? modelWeightsId : [modelWeightsId]; + return new BundleResourceHandler(modelJson, modelWeightsIdArr); } diff --git a/tfjs-react-native/src/bundle_resource_io_test.ts b/tfjs-react-native/src/bundle_resource_io_test.ts index 98b1dc2c57d..2fc8b181def 100644 --- a/tfjs-react-native/src/bundle_resource_io_test.ts +++ b/tfjs-react-native/src/bundle_resource_io_test.ts @@ -132,3 +132,136 @@ describeWithFlags('BundleResourceIO', RN_ENVS, () => { 'Have you wrapped yor asset path in a require() statment?')); }); }); + +describeWithFlags('BundleResourceIO Sharded', RN_ENVS, () => { + // Test data. + const modelTopology: {} = { + 'class_name': 'Sequential', + 'keras_version': '2.1.4', + 'config': [ + { + 'class_name': 'Dense', + 'config': { + 'kernel_initializer': { + 'class_name': 'VarianceScaling', + 'config': { + 'distribution': 'uniform', + 'scale': 1.0, + 'seed': null, + 'mode': 'fan_avg' + } + }, + 'name': 'dense', + 'kernel_constraint': null, + 'bias_regularizer': null, + 'bias_constraint': null, + 'dtype': 'float32', + 'activation': 'linear', + 'trainable': true, + 'kernel_regularizer': null, + 'bias_initializer': {'class_name': 'Zeros', 'config': {}}, + 'units': 1, + 'batch_input_shape': [null, 3], + 'use_bias': true, + 'activity_regularizer': null + } + }, + { + 'class_name': 'Dense', + 'config': { + 'kernel_initializer': { + 'class_name': 'VarianceScaling', + 'config': { + 'distribution': 'uniform', + 'scale': 1.0, + 'seed': null, + 'mode': 'fan_avg' + } + }, + 'name': 'dense2', + 'kernel_constraint': null, + 'bias_regularizer': null, + 'bias_constraint': null, + 'dtype': 'float32', + 'activation': 'linear', + 'trainable': true, + 'kernel_regularizer': null, + 'bias_initializer': {'class_name': 'Zeros', 'config': {}}, + 'units': 1, + 'batch_input_shape': [null, 3], + 'use_bias': true, + 'activity_regularizer': null + } + } + ], + 'backend': 'tensorflow' + }; + + const weightSpecs: tf.io.WeightsManifestEntry[] = [ + { + name: 'dense/kernel', + shape: [3, 1], + dtype: 'float32', + }, + { + name: 'dense/bias', + shape: [1], + dtype: 'float32', + }, + { + name: 'dense2/kernel', + shape: [3, 1], + dtype: 'float32', + }, + { + name: 'dense2/bias', + shape: [1], + dtype: 'float32', + } + ]; + const weightData1 = new ArrayBuffer(16); + const weightData2 = new ArrayBuffer(16); + const resourceIds = [1, 2]; + + const combinedWeightsExpected = new ArrayBuffer(32); + + it('constructs an IOHandler', async () => { + const modelJson: tf.io.ModelJSON = { + modelTopology, + weightsManifest: [{ + paths: [], + weights: weightSpecs, + }] + + }; + + const handler = bundleResourceIO(modelJson, resourceIds); + expect(typeof handler.load).toBe('function'); + expect(typeof handler.save).toBe('function'); + }); + + it('loads model artifacts', async () => { + spyOn(tf.env().platform, 'fetch') + .and.returnValues( + Promise.resolve(new Response(weightData1)), + Promise.resolve(new Response(weightData2)), + ); + + const modelJson: tf.io.ModelJSON = { + modelTopology, + weightsManifest: [{ + paths: [], + weights: weightSpecs, + }] + + }; + + const handler = bundleResourceIO(modelJson, resourceIds); + + const loaded = await handler.load(); + + expect(loaded.modelTopology).toEqual(modelTopology); + expect(loaded.weightSpecs).toEqual(weightSpecs); + expect(loaded.weightData).toEqual(combinedWeightsExpected); + }); +});