[res/TensorFlowTests] test models for fusing DepthwiseConv with other ops (#8457)
author윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 <hyunsik.yoon@samsung.com>
Thu, 24 Oct 2019 23:16:17 +0000 (08:16 +0900)
committer박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Thu, 24 Oct 2019 23:16:17 +0000 (08:16 +0900)
This adds test models for fusing DepthwiseConv with other ops.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
12 files changed:
res/TensorFlowTests/NET_0038/test.info [new file with mode: 0644]
res/TensorFlowTests/NET_0038/test.manifest [new file with mode: 0644]
res/TensorFlowTests/NET_0038/test.pbtxt [new file with mode: 0644]
res/TensorFlowTests/NET_0039/test.info [new file with mode: 0644]
res/TensorFlowTests/NET_0039/test.manifest [new file with mode: 0644]
res/TensorFlowTests/NET_0039/test.pbtxt [new file with mode: 0644]
res/TensorFlowTests/NET_0040/test.info [new file with mode: 0644]
res/TensorFlowTests/NET_0040/test.manifest [new file with mode: 0644]
res/TensorFlowTests/NET_0040/test.pbtxt [new file with mode: 0644]
res/TensorFlowTests/NET_0041/test.info [new file with mode: 0644]
res/TensorFlowTests/NET_0041/test.manifest [new file with mode: 0644]
res/TensorFlowTests/NET_0041/test.pbtxt [new file with mode: 0644]

diff --git a/res/TensorFlowTests/NET_0038/test.info b/res/TensorFlowTests/NET_0038/test.info
new file mode 100644 (file)
index 0000000..099f3d6
--- /dev/null
@@ -0,0 +1,2 @@
+input, input:0,  TF_FLOAT,   [1, 11, 7, 3]
+output, output/relu:0,  TF_FLOAT,   [1, 6, 4, 12]
diff --git a/res/TensorFlowTests/NET_0038/test.manifest b/res/TensorFlowTests/NET_0038/test.manifest
new file mode 100644 (file)
index 0000000..929125e
--- /dev/null
@@ -0,0 +1 @@
+SUMMARY: DepthwiseConv2D + Relu
diff --git a/res/TensorFlowTests/NET_0038/test.pbtxt b/res/TensorFlowTests/NET_0038/test.pbtxt
new file mode 100644 (file)
index 0000000..b71e58f
--- /dev/null
@@ -0,0 +1,121 @@
+# DepthwiseConv2dNative node is borrowed from UNIT_DepthwiseConv2dNative_000.
+node {
+  name: "input"
+  op: "Placeholder"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "shape"
+    value {
+      shape {
+        dim {
+          size: 1
+        }
+        dim {
+          size: 11
+        }
+        dim {
+          size: 7
+        }
+        dim {
+          size: 3
+        }
+      }
+    }
+  }
+}
+node {
+  name: "Const"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_FLOAT
+        tensor_shape {
+          dim {
+            size: 2
+          }
+          dim {
+            size: 3
+          }
+          dim {
+            size: 3
+          }
+          dim {
+            size: 4
+          }
+        }
+        float_val: 1.0
+      }
+    }
+  }
+}
+node {
+  name: "DepthwiseConv2dNative"
+  op: "DepthwiseConv2dNative"
+  input: "input"
+  input: "Const"
+  attr {
+    key: "T"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "data_format"
+    value {
+      s: "NHWC"
+    }
+  }
+  attr {
+    key: "dilations"
+    value {
+      list {
+        i: 1
+        i: 1
+        i: 1
+        i: 1
+      }
+    }
+  }
+  attr {
+    key: "padding"
+    value {
+      s: "SAME"
+    }
+  }
+  attr {
+    key: "strides"
+    value {
+      list {
+        i: 1
+        i: 2
+        i: 2
+        i: 1
+      }
+    }
+  }
+}
+
+node {
+  name: "output/relu"
+  op: "Relu"
+  input: "DepthwiseConv2dNative"
+  attr {
+    key: "T"
+    value {
+      type: DT_FLOAT
+    }
+  }
+}
diff --git a/res/TensorFlowTests/NET_0039/test.info b/res/TensorFlowTests/NET_0039/test.info
new file mode 100644 (file)
index 0000000..73c4463
--- /dev/null
@@ -0,0 +1,2 @@
+input, input:0,  TF_FLOAT,   [1, 11, 7, 3]
+output, add:0,  TF_FLOAT,   [1, 6, 4, 12]
diff --git a/res/TensorFlowTests/NET_0039/test.manifest b/res/TensorFlowTests/NET_0039/test.manifest
new file mode 100644 (file)
index 0000000..7832074
--- /dev/null
@@ -0,0 +1 @@
+SUMMARY: DepthwiseConv2D + Add
diff --git a/res/TensorFlowTests/NET_0039/test.pbtxt b/res/TensorFlowTests/NET_0039/test.pbtxt
new file mode 100644 (file)
index 0000000..25f4599
--- /dev/null
@@ -0,0 +1,146 @@
+# DepthwiseConv2dNative node is borrowed from UNIT_DepthwiseConv2dNative_000.
+node {
+  name: "input"
+  op: "Placeholder"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "shape"
+    value {
+      shape {
+        dim {
+          size: 1
+        }
+        dim {
+          size: 11
+        }
+        dim {
+          size: 7
+        }
+        dim {
+          size: 3
+        }
+      }
+    }
+  }
+}
+node {
+  name: "Const"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_FLOAT
+        tensor_shape {
+          dim {
+            size: 2
+          }
+          dim {
+            size: 3
+          }
+          dim {
+            size: 3
+          }
+          dim {
+            size: 4
+          }
+        }
+        float_val: 1.0
+      }
+    }
+  }
+}
+node {
+  name: "DepthwiseConv2dNative"
+  op: "DepthwiseConv2dNative"
+  input: "input"
+  input: "Const"
+  attr {
+    key: "T"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "data_format"
+    value {
+      s: "NHWC"
+    }
+  }
+  attr {
+    key: "dilations"
+    value {
+      list {
+        i: 1
+        i: 1
+        i: 1
+        i: 1
+      }
+    }
+  }
+  attr {
+    key: "padding"
+    value {
+      s: "SAME"
+    }
+  }
+  attr {
+    key: "strides"
+    value {
+      list {
+        i: 1
+        i: 2
+        i: 2
+        i: 1
+      }
+    }
+  }
+}
+
+node {
+  name: "add_const"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_FLOAT
+        tensor_shape {
+          dim {
+            size: 12
+          }
+        }
+        float_val: 1.0
+      }
+    }
+  }
+}
+node {
+  name: "add"
+  op: "Add"
+  input: "DepthwiseConv2dNative"
+  input: "add_const"
+  attr {
+    key: "T"
+    value {
+      type: DT_FLOAT
+    }
+  }
+}
diff --git a/res/TensorFlowTests/NET_0040/test.info b/res/TensorFlowTests/NET_0040/test.info
new file mode 100644 (file)
index 0000000..099f3d6
--- /dev/null
@@ -0,0 +1,2 @@
+input, input:0,  TF_FLOAT,   [1, 11, 7, 3]
+output, output/relu:0,  TF_FLOAT,   [1, 6, 4, 12]
diff --git a/res/TensorFlowTests/NET_0040/test.manifest b/res/TensorFlowTests/NET_0040/test.manifest
new file mode 100644 (file)
index 0000000..86bbc60
--- /dev/null
@@ -0,0 +1 @@
+SUMMARY: DepthwiseConv2D + BiasAdd + Relu
diff --git a/res/TensorFlowTests/NET_0040/test.pbtxt b/res/TensorFlowTests/NET_0040/test.pbtxt
new file mode 100644 (file)
index 0000000..b35f676
--- /dev/null
@@ -0,0 +1,164 @@
+# DepthwiseConv2dNative node is borrowed from UNIT_DepthwiseConv2dNative_000.
+node {
+  name: "input"
+  op: "Placeholder"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "shape"
+    value {
+      shape {
+        dim {
+          size: 1
+        }
+        dim {
+          size: 11
+        }
+        dim {
+          size: 7
+        }
+        dim {
+          size: 3
+        }
+      }
+    }
+  }
+}
+node {
+  name: "Const"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_FLOAT
+        tensor_shape {
+          dim {
+            size: 2
+          }
+          dim {
+            size: 3
+          }
+          dim {
+            size: 3
+          }
+          dim {
+            size: 4
+          }
+        }
+        float_val: 1.0
+      }
+    }
+  }
+}
+node {
+  name: "DepthwiseConv2dNative"
+  op: "DepthwiseConv2dNative"
+  input: "input"
+  input: "Const"
+  attr {
+    key: "T"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "data_format"
+    value {
+      s: "NHWC"
+    }
+  }
+  attr {
+    key: "dilations"
+    value {
+      list {
+        i: 1
+        i: 1
+        i: 1
+        i: 1
+      }
+    }
+  }
+  attr {
+    key: "padding"
+    value {
+      s: "SAME"
+    }
+  }
+  attr {
+    key: "strides"
+    value {
+      list {
+        i: 1
+        i: 2
+        i: 2
+        i: 1
+      }
+    }
+  }
+}
+
+node {
+  name: "bias_const"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_FLOAT
+        tensor_shape {
+          dim {
+            size: 12
+          }
+        }
+        float_val: 1.0
+      }
+    }
+  }
+}
+node {
+  name: "biasadd"
+  op: "BiasAdd"
+  input: "DepthwiseConv2dNative"
+  input: "bias_const"
+  attr {
+    key: "T"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "data_format"
+    value {
+      s: "NHWC"
+    }
+  }
+}
+
+node {
+  name: "output/relu"
+  op: "Relu"
+  input: "biasadd"
+  attr {
+    key: "T"
+    value {
+      type: DT_FLOAT
+    }
+  }
+}
diff --git a/res/TensorFlowTests/NET_0041/test.info b/res/TensorFlowTests/NET_0041/test.info
new file mode 100644 (file)
index 0000000..099f3d6
--- /dev/null
@@ -0,0 +1,2 @@
+input, input:0,  TF_FLOAT,   [1, 11, 7, 3]
+output, output/relu:0,  TF_FLOAT,   [1, 6, 4, 12]
diff --git a/res/TensorFlowTests/NET_0041/test.manifest b/res/TensorFlowTests/NET_0041/test.manifest
new file mode 100644 (file)
index 0000000..0e9adb9
--- /dev/null
@@ -0,0 +1 @@
+SUMMARY: DepthwiseConv2D + Sub (scalar) + Relu
diff --git a/res/TensorFlowTests/NET_0041/test.pbtxt b/res/TensorFlowTests/NET_0041/test.pbtxt
new file mode 100644 (file)
index 0000000..a328417
--- /dev/null
@@ -0,0 +1,158 @@
+# DepthwiseConv2dNative node is borrowed from UNIT_DepthwiseConv2dNative_000.
+node {
+  name: "input"
+  op: "Placeholder"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "shape"
+    value {
+      shape {
+        dim {
+          size: 1
+        }
+        dim {
+          size: 11
+        }
+        dim {
+          size: 7
+        }
+        dim {
+          size: 3
+        }
+      }
+    }
+  }
+}
+node {
+  name: "Const"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_FLOAT
+        tensor_shape {
+          dim {
+            size: 2
+          }
+          dim {
+            size: 3
+          }
+          dim {
+            size: 3
+          }
+          dim {
+            size: 4
+          }
+        }
+        float_val: 1.0
+      }
+    }
+  }
+}
+node {
+  name: "DepthwiseConv2dNative"
+  op: "DepthwiseConv2dNative"
+  input: "input"
+  input: "Const"
+  attr {
+    key: "T"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "data_format"
+    value {
+      s: "NHWC"
+    }
+  }
+  attr {
+    key: "dilations"
+    value {
+      list {
+        i: 1
+        i: 1
+        i: 1
+        i: 1
+      }
+    }
+  }
+  attr {
+    key: "padding"
+    value {
+      s: "SAME"
+    }
+  }
+  attr {
+    key: "strides"
+    value {
+      list {
+        i: 1
+        i: 2
+        i: 2
+        i: 1
+      }
+    }
+  }
+}
+
+node {
+  name: "sub_scalar_const"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_FLOAT
+        tensor_shape {
+          dim {
+            size: 1
+          }
+        }
+        float_val: 1.0
+      }
+    }
+  }
+}
+node {
+  name: "sub"
+  op: "Sub"
+  input: "DepthwiseConv2dNative"
+  input: "sub_scalar_const"
+  attr {
+    key: "T"
+    value {
+      type: DT_FLOAT
+    }
+  }
+}
+
+node {
+  name: "output/relu"
+  op: "Relu"
+  input: "sub"
+  attr {
+    key: "T"
+    value {
+      type: DT_FLOAT
+    }
+  }
+}