[res] NET_XXXX to replace SMALL_NET_XXXX (#6621)
author박천교/On-Device Lab(SR)/Engineer/삼성전자 <ch.bahk@samsung.com>
Fri, 16 Aug 2019 01:46:33 +0000 (10:46 +0900)
committer박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Fri, 16 Aug 2019 01:46:33 +0000 (10:46 +0900)
This commit adds NET_XXXX tests which copies SMALL_NET_XXXX tests

Signed-off-by: Cheongyo Bahk <ch.bahk@samsung.com>
34 files changed:
res/TensorFlowTests/NET_0000/test.info [new file with mode: 0644]
res/TensorFlowTests/NET_0000/test.pbtxt [new file with mode: 0644]
res/TensorFlowTests/NET_0001/test.info [new file with mode: 0644]
res/TensorFlowTests/NET_0001/test.pbtxt [new file with mode: 0644]
res/TensorFlowTests/NET_0002/test.info [new file with mode: 0644]
res/TensorFlowTests/NET_0002/test.pbtxt [new file with mode: 0644]
res/TensorFlowTests/NET_0003/test.info [new file with mode: 0644]
res/TensorFlowTests/NET_0003/test.pbtxt [new file with mode: 0644]
res/TensorFlowTests/NET_0003/test.py [new file with mode: 0644]
res/TensorFlowTests/NET_0004/test.info [new file with mode: 0644]
res/TensorFlowTests/NET_0004/test.pbtxt [new file with mode: 0644]
res/TensorFlowTests/NET_0004/test.py [new file with mode: 0644]
res/TensorFlowTests/NET_0005/test.info [new file with mode: 0644]
res/TensorFlowTests/NET_0005/test.pbtxt [new file with mode: 0644]
res/TensorFlowTests/NET_0006/test.info [new file with mode: 0644]
res/TensorFlowTests/NET_0006/test.pbtxt [new file with mode: 0644]
res/TensorFlowTests/NET_0007/test.info [new file with mode: 0644]
res/TensorFlowTests/NET_0007/test.pbtxt [new file with mode: 0644]
res/TensorFlowTests/NET_0008/test.info [new file with mode: 0644]
res/TensorFlowTests/NET_0008/test.pbtxt [new file with mode: 0644]
res/TensorFlowTests/NET_0009/test.info [new file with mode: 0644]
res/TensorFlowTests/NET_0009/test.pbtxt [new file with mode: 0644]
res/TensorFlowTests/NET_0010/test.info [new file with mode: 0644]
res/TensorFlowTests/NET_0010/test.pbtxt [new file with mode: 0644]
res/TensorFlowTests/NET_0011/test.info [new file with mode: 0644]
res/TensorFlowTests/NET_0011/test.pbtxt [new file with mode: 0644]
res/TensorFlowTests/NET_0012/test.info [new file with mode: 0644]
res/TensorFlowTests/NET_0012/test.pbtxt [new file with mode: 0644]
res/TensorFlowTests/NET_0013/test.info [new file with mode: 0644]
res/TensorFlowTests/NET_0013/test.pbtxt [new file with mode: 0644]
res/TensorFlowTests/NET_0014/test.info [new file with mode: 0644]
res/TensorFlowTests/NET_0014/test.pbtxt [new file with mode: 0644]
res/TensorFlowTests/NET_0015/test.info [new file with mode: 0644]
res/TensorFlowTests/NET_0015/test.pbtxt [new file with mode: 0644]

diff --git a/res/TensorFlowTests/NET_0000/test.info b/res/TensorFlowTests/NET_0000/test.info
new file mode 100644 (file)
index 0000000..bdde912
--- /dev/null
@@ -0,0 +1,3 @@
+# conv2d with VALID, stride = 1, 1
+input,  ifm:0,  TF_FLOAT,  [1, 5, 5, 3]
+output, maxpool:0,  TF_FLOAT,  [1, 4, 4, 2]
diff --git a/res/TensorFlowTests/NET_0000/test.pbtxt b/res/TensorFlowTests/NET_0000/test.pbtxt
new file mode 100644 (file)
index 0000000..5aafa31
--- /dev/null
@@ -0,0 +1,102 @@
+# Small Conv2D-MaxPool network
+node {
+  name: "ifm"
+  op: "Placeholder"
+  attr {
+    key: "dtype"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "shape"
+    value {
+      shape {
+        dim { size: 1 }
+        dim { size: 5 }
+        dim { size: 5 }
+        dim { size: 3 }
+      }
+    }
+  }
+}
+node {
+  name: "ker"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_FLOAT
+        tensor_shape {
+          dim { size: 2 }
+          dim { size: 2 }
+          dim { size: 3 }
+          dim { size: 2 }
+        }
+        float_val: 1.1
+      }
+    }
+  }
+}
+node {
+  name: "ofm"
+  op: "Conv2D"
+  input: "ifm"
+  input: "ker"
+  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: "VALID" }
+  }
+  attr {
+    key: "strides"
+    value {
+      list { i: 1 i: 1 i: 1 i: 1 }
+    }
+  }
+}
+node {
+  name: "maxpool"
+  op: "MaxPool"
+  input: "ofm"
+  attr {
+    key: "T"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "data_format"
+    value { s: "NHWC" }
+  }
+  attr {
+    key: "ksize"
+    value {
+      list { i: 1 i: 1 i: 1 i: 1 }
+    }
+  }
+  attr {
+    key: "padding"
+    value { s: "VALID" }
+  }
+  attr {
+    key: "strides"
+    value {
+      list { i: 1 i: 1 i: 1 i: 1 }
+    }
+  }
+}
diff --git a/res/TensorFlowTests/NET_0001/test.info b/res/TensorFlowTests/NET_0001/test.info
new file mode 100644 (file)
index 0000000..0e8caae
--- /dev/null
@@ -0,0 +1,2 @@
+input, in:0, TF_FLOAT, [1, 5, 5, 3]
+output, out:0, TF_FLOAT, [1, 4, 4, 5]
diff --git a/res/TensorFlowTests/NET_0001/test.pbtxt b/res/TensorFlowTests/NET_0001/test.pbtxt
new file mode 100644 (file)
index 0000000..fc84d61
--- /dev/null
@@ -0,0 +1,160 @@
+# Small Conv2D-BiasAdd-Conv2D network
+node {
+  name: "in"
+  op: "Placeholder"
+  attr {
+    key: "dtype"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "shape"
+    value {
+      shape {
+        dim { size: 1 } # N
+        dim { size: 5 } # H
+        dim { size: 5 } # W
+        dim { size: 3 } # C
+      }
+    }
+  }
+}
+node {
+  name: "ker"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_FLOAT
+        tensor_shape {
+          dim { size: 2 } # H
+          dim { size: 2 } # W
+          dim { size: 3 } # I
+          dim { size: 2 } # O
+        }
+        float_val: 1.1
+      }
+    }
+  }
+}
+node {
+  name: "conv"
+  op: "Conv2D"
+  input: "in"
+  input: "ker"
+  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: "VALID" }
+  }
+  attr {
+    key: "strides"
+    value {
+      list { i: 1 i: 1 i: 1 i: 1 }
+    }
+  }
+}
+node {
+  name: "bias"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_FLOAT
+        tensor_shape {
+          dim { size: 2 }
+        }
+        float_val: 1.1
+      }
+    }
+  }
+}
+node {
+  name: "badd"
+  op: "BiasAdd"
+  input: "conv"
+  input: "bias"
+  attr {
+    key: "T"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "data_format"
+    value { s: "NHWC" }
+  }
+}
+node {
+  name: "ker1"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_FLOAT
+        tensor_shape {
+          dim { size: 1 } # H
+          dim { size: 1 } # W
+          dim { size: 2 } # I
+          dim { size: 5 } # O
+        }
+        float_val: 1.1
+      }
+    }
+  }
+}
+node {
+  name: "out"
+  op: "Conv2D"
+  input: "badd"
+  input: "ker1"
+  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: "VALID" }
+  }
+  attr {
+    key: "strides"
+    value {
+      list { i: 1 i: 1 i: 1 i: 1 }
+    }
+  }
+}
diff --git a/res/TensorFlowTests/NET_0002/test.info b/res/TensorFlowTests/NET_0002/test.info
new file mode 100644 (file)
index 0000000..0e8caae
--- /dev/null
@@ -0,0 +1,2 @@
+input, in:0, TF_FLOAT, [1, 5, 5, 3]
+output, out:0, TF_FLOAT, [1, 4, 4, 5]
diff --git a/res/TensorFlowTests/NET_0002/test.pbtxt b/res/TensorFlowTests/NET_0002/test.pbtxt
new file mode 100644 (file)
index 0000000..692651a
--- /dev/null
@@ -0,0 +1,135 @@
+# Small Conv2D-ReLU-Conv2D network
+node {
+  name: "in"
+  op: "Placeholder"
+  attr {
+    key: "dtype"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "shape"
+    value {
+      shape {
+        dim { size: 1 } # N
+        dim { size: 5 } # H
+        dim { size: 5 } # W
+        dim { size: 3 } # C
+      }
+    }
+  }
+}
+node {
+  name: "ker"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_FLOAT
+        tensor_shape {
+          dim { size: 2 } # H
+          dim { size: 2 } # W
+          dim { size: 3 } # I
+          dim { size: 2 } # O
+        }
+        float_val: 1.1
+      }
+    }
+  }
+}
+node {
+  name: "conv"
+  op: "Conv2D"
+  input: "in"
+  input: "ker"
+  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: "VALID" }
+  }
+  attr {
+    key: "strides"
+    value {
+      list { i: 1 i: 1 i: 1 i: 1 }
+    }
+  }
+}
+node {
+  name: "relu"
+  op: "Relu"
+  input: "conv"
+  attr {
+    key: "T"
+    value { type: DT_FLOAT }
+  }
+}
+node {
+  name: "ker1"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_FLOAT
+        tensor_shape {
+          dim { size: 1 } # H
+          dim { size: 1 } # W
+          dim { size: 2 } # I
+          dim { size: 5 } # O
+        }
+        float_val: 1.1
+      }
+    }
+  }
+}
+node {
+  name: "out"
+  op: "Conv2D"
+  input: "relu"
+  input: "ker1"
+  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: "VALID" }
+  }
+  attr {
+    key: "strides"
+    value {
+      list { i: 1 i: 1 i: 1 i: 1 }
+    }
+  }
+}
diff --git a/res/TensorFlowTests/NET_0003/test.info b/res/TensorFlowTests/NET_0003/test.info
new file mode 100644 (file)
index 0000000..ee7d13c
--- /dev/null
@@ -0,0 +1,2 @@
+input, Placeholder:0, TF_FLOAT, [1, 3, 3, 5]
+output, FusedBatchNorm:0, TF_FLOAT, [1, 3, 3, 1]
diff --git a/res/TensorFlowTests/NET_0003/test.pbtxt b/res/TensorFlowTests/NET_0003/test.pbtxt
new file mode 100644 (file)
index 0000000..cf6b1a7
--- /dev/null
@@ -0,0 +1,244 @@
+# Small Conv2D + FusedBatchNorm network
+node {
+  name: "Placeholder"
+  op: "Placeholder"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "shape"
+    value {
+      shape {
+        dim {
+          size: 1 # N
+        }
+        dim {
+          size: 3 # H
+        }
+        dim {
+          size: 3 # W
+        }
+        dim {
+          size: 5 # C
+        }
+      }
+    }
+  }
+}
+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 # H
+          }
+          dim {
+            size: 2 # W
+          }
+          dim {
+            size: 5 # I
+          }
+          dim {
+            size: 1 # O
+          }
+        }
+        float_val: 1.0
+      }
+    }
+  }
+}
+node {
+  name: "Conv2D"
+  op: "Conv2D"
+  input: "Placeholder"
+  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: 1
+        i: 1
+        i: 1
+      }
+    }
+  }
+  attr {
+    key: "use_cudnn_on_gpu"
+    value {
+      b: true
+    }
+  }
+}
+node {
+  name: "scale"
+  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: "offset"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_FLOAT
+        tensor_shape {
+          dim {
+            size: 1
+          }
+        }
+        float_val: 0.0
+      }
+    }
+  }
+}
+node {
+  name: "FusedBatchNorm/mean"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_FLOAT
+        tensor_shape {
+          dim {
+            size: 1
+          }
+        }
+        float_val: 0.0
+      }
+    }
+  }
+}
+node {
+  name: "FusedBatchNorm/variance"
+  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: "FusedBatchNorm"
+  op: "FusedBatchNorm"
+  input: "Conv2D"
+  input: "scale"
+  input: "offset"
+  input: "FusedBatchNorm/mean"
+  input: "FusedBatchNorm/variance"
+  attr {
+    key: "T"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "data_format"
+    value {
+      s: "NHWC"
+    }
+  }
+  attr {
+    key: "epsilon"
+    value {
+      f: 0.0010000000474974513
+    }
+  }
+  attr {
+    key: "is_training"
+    value {
+      b: false
+    }
+  }
+}
diff --git a/res/TensorFlowTests/NET_0003/test.py b/res/TensorFlowTests/NET_0003/test.py
new file mode 100644 (file)
index 0000000..b5bad2d
--- /dev/null
@@ -0,0 +1,15 @@
+# TF_SMALL_NET_0003/test.pbtxt is create with below script
+
+# Version info
+#  - Tensorflow : 1.13.1
+#  - Python : 3.5.2
+
+import tensorflow as tf
+
+input0 = tf.placeholder(tf.float32, [1, 3, 3, 5])
+filter0 = tf.constant(1.0, shape=[2, 2, 5, 1])
+conv = tf.nn.conv2d(input0, filter=filter0, strides=[1, 1, 1, 1], padding='SAME')
+fbn = tf.nn.fused_batch_norm(
+    conv, scale=[1.0], offset=[0.0], mean=[0.0], variance=[1.0], is_training=False)
+
+print(tf.get_default_graph().as_graph_def())
diff --git a/res/TensorFlowTests/NET_0004/test.info b/res/TensorFlowTests/NET_0004/test.info
new file mode 100644 (file)
index 0000000..75a8922
--- /dev/null
@@ -0,0 +1,2 @@
+input, Placeholder:0, TF_FLOAT, [1, 3, 3, 5]
+output, FusedBatchNorm:0, TF_FLOAT, [1, 3, 3, 10]
diff --git a/res/TensorFlowTests/NET_0004/test.pbtxt b/res/TensorFlowTests/NET_0004/test.pbtxt
new file mode 100644 (file)
index 0000000..18cdd65
--- /dev/null
@@ -0,0 +1,218 @@
+# Small DepthwiseConv2D + FusedBatchNorm network
+node {
+  name: "Placeholder"
+  op: "Placeholder"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "shape"
+    value {
+      shape {
+        dim {
+          size: 1
+        }
+        dim {
+          size: 3
+        }
+        dim {
+          size: 3
+        }
+        dim {
+          size: 5
+        }
+      }
+    }
+  }
+}
+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: 2
+          }
+          dim {
+            size: 5
+          }
+          dim {
+            size: 2
+          }
+        }
+        float_val: 1
+      }
+    }
+  }
+}
+node {
+  name: "depthwise/Shape"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_INT32
+    }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_INT32
+        tensor_shape {
+          dim {
+            size: 4
+          }
+        }
+        int_val: 2
+        int_val: 2
+        int_val: 5
+        int_val: 2
+      }
+    }
+  }
+}
+node {
+  name: "depthwise/dilation_rate"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_INT32
+    }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_INT32
+        tensor_shape {
+          dim {
+            size: 2
+          }
+        }
+        int_val: 1
+        int_val: 1
+      }
+    }
+  }
+}
+node {
+  name: "depthwise"
+  op: "DepthwiseConv2dNative"
+  input: "Placeholder"
+  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: 1
+        i: 1
+        i: 1
+      }
+    }
+  }
+}
+node {
+  name: "Const_1"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_FLOAT
+        tensor_shape {
+          dim {
+            size: 10
+          }
+        }
+        float_val: 2
+      }
+    }
+  }
+}
+node {
+  name: "FusedBatchNorm"
+  op: "FusedBatchNorm"
+  input: "depthwise"
+  input: "Const_1"
+  input: "Const_1"
+  input: "Const_1"
+  input: "Const_1"
+  attr {
+    key: "T"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "data_format"
+    value {
+      s: "NHWC"
+    }
+  }
+  attr {
+    key: "epsilon"
+    value {
+      f: 0.001
+    }
+  }
+  attr {
+    key: "is_training"
+    value {
+      b: false
+    }
+  }
+}
diff --git a/res/TensorFlowTests/NET_0004/test.py b/res/TensorFlowTests/NET_0004/test.py
new file mode 100644 (file)
index 0000000..a0c790d
--- /dev/null
@@ -0,0 +1,16 @@
+# TF_SMALL_NET_0004/test.pbtxt is create with below script
+
+# Version info
+#  - Tensorflow : 1.13.1
+#  - Python : 3.5.2
+
+import tensorflow as tf
+
+input0 = tf.placeholder(tf.float32, [1, 3, 3, 5])
+filter0 = tf.constant(1.0, shape=[2, 2, 5, 2])
+dconv = tf.nn.depthwise_conv2d(input0, filter0, [1, 1, 1, 1], 'SAME')
+const = tf.constant(2.0, shape=[10])
+fbn = tf.nn.fused_batch_norm(
+    x=dconv, scale=const, offset=const, mean=const, variance=const, is_training=False)
+
+print(tf.get_default_graph().as_graph_def())
diff --git a/res/TensorFlowTests/NET_0005/test.info b/res/TensorFlowTests/NET_0005/test.info
new file mode 100644 (file)
index 0000000..379959c
--- /dev/null
@@ -0,0 +1,2 @@
+input, Placeholder:0, TF_FLOAT, [1, 2, 3, 2]
+output, Reshape2:0, TF_FLOAT, [1, 2, 3, 2]
diff --git a/res/TensorFlowTests/NET_0005/test.pbtxt b/res/TensorFlowTests/NET_0005/test.pbtxt
new file mode 100644 (file)
index 0000000..16cc440
--- /dev/null
@@ -0,0 +1,120 @@
+# Small Shape + Reshape network
+# This test is quite similar with the last part of InceptionV3
+node {
+  name: "Placeholder"
+  op: "Placeholder"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "shape"
+    value {
+      shape {
+        dim {
+          size: 1
+        }
+        dim {
+          size: 2
+        }
+        dim {
+          size: 3
+        }
+        dim {
+          size: 2
+        }
+      }
+    }
+  }
+}
+node {
+  name: "Shape"
+  op: "Shape"
+  input: "Placeholder"
+  attr {
+    key: "T"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "out_type"
+    value {
+      type: DT_INT32
+    }
+  }
+}
+node {
+  name: "Const"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_INT32
+    }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_INT32
+        tensor_shape {
+          dim {
+            size: 2
+          }
+        }
+        int_val: 3
+        int_val: 4
+      }
+    }
+  }
+}
+node {
+  name: "Reshape1"
+  op: "Reshape"
+  input: "Placeholder"
+  input: "Const"
+  attr {
+    key: "T"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "Tshape"
+    value {
+      type: DT_INT32
+    }
+  }
+}
+node {
+  name: "Relu"
+  op: "Relu"
+  input: "Reshape1"
+  attr {
+    key: "T"
+    value {
+      type: DT_FLOAT
+    }
+  }
+}
+node {
+  name: "Reshape2"
+  op: "Reshape"
+  input: "Relu"
+  input: "Shape"
+  attr {
+    key: "T"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "Tshape"
+    value {
+      type: DT_INT32
+    }
+  }
+}
diff --git a/res/TensorFlowTests/NET_0006/test.info b/res/TensorFlowTests/NET_0006/test.info
new file mode 100644 (file)
index 0000000..f0b1e20
--- /dev/null
@@ -0,0 +1,2 @@
+input, placeholder:0, TF_FLOAT, [1, 7, 7, 1]
+output, maxpool:0, TF_FLOAT, [1, 7, 7, 2]
diff --git a/res/TensorFlowTests/NET_0006/test.pbtxt b/res/TensorFlowTests/NET_0006/test.pbtxt
new file mode 100644 (file)
index 0000000..e92b606
--- /dev/null
@@ -0,0 +1,149 @@
+# A simple network that has "Concat" in between feature operations.
+#
+#   Placeholder -+-> MaxPool2D -+-> Concat -> MaxPool2D
+#                |              |
+#                +-> MaxPool2D -+
+#
+node {
+  name: "placeholder"
+  op: "Placeholder"
+  attr {
+    key: "dtype"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "shape"
+    value {
+      shape {
+        dim { size: 1 } # N
+        dim { size: 7 } # H
+        dim { size: 7 } # W
+        dim { size: 1 } # C
+      }
+    }
+  }
+}
+node {
+  name: "maxpool_1"
+  op: "MaxPool"
+  input: "placeholder"
+  attr {
+    key: "T"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "data_format"
+    value { s: "NHWC" }
+  }
+  attr {
+    key: "ksize"
+    value {
+      list { i: 1 i: 1 i: 1 i: 1 }
+    }
+  }
+  attr {
+    key: "padding"
+    value { s: "VALID" }
+  }
+  attr {
+    key: "strides"
+    value {
+      list { i: 1 i: 1 i: 1 i: 1 }
+    }
+  }
+}
+node {
+  name: "maxpool_2"
+  op: "MaxPool"
+  input: "placeholder"
+  attr {
+    key: "T"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "data_format"
+    value { s: "NHWC" }
+  }
+  attr {
+    key: "ksize"
+    value {
+      list { i: 1 i: 1 i: 1 i: 1 }
+    }
+  }
+  attr {
+    key: "padding"
+    value { s: "VALID" }
+  }
+  attr {
+    key: "strides"
+    value {
+      list { i: 1 i: 1 i: 1 i: 1 }
+    }
+  }
+}
+node {
+  name: "axis"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value { type: DT_INT32  }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_INT32
+        tensor_shape { }
+        int_val: 3
+      }
+    }
+  }
+}
+node {
+  name: "concat"
+  op: "ConcatV2"
+  input: "maxpool_1"
+  input: "maxpool_2"
+  input: "axis"
+  attr {
+    key: "N"
+    value { i: 2 }
+  }
+  attr {
+    key: "T"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "Tidx"
+    value { type: DT_INT32 }
+  }
+}
+node {
+  name: "maxpool"
+  op: "MaxPool"
+  input: "concat"
+  attr {
+    key: "T"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "data_format"
+    value { s: "NHWC" }
+  }
+  attr {
+    key: "ksize"
+    value {
+      list { i: 1 i: 1 i: 1 i: 1 }
+    }
+  }
+  attr {
+    key: "padding"
+    value { s: "VALID" }
+  }
+  attr {
+    key: "strides"
+    value {
+      list { i: 1 i: 1 i: 1 i: 1 }
+    }
+  }
+}
diff --git a/res/TensorFlowTests/NET_0007/test.info b/res/TensorFlowTests/NET_0007/test.info
new file mode 100644 (file)
index 0000000..59c3f61
--- /dev/null
@@ -0,0 +1,2 @@
+input, Placeholder:0, TF_FLOAT, [1, 3, 3, 5]
+output, Mul:0, TF_FLOAT, [1, 3, 3, 2]
diff --git a/res/TensorFlowTests/NET_0007/test.pbtxt b/res/TensorFlowTests/NET_0007/test.pbtxt
new file mode 100644 (file)
index 0000000..10f9f35
--- /dev/null
@@ -0,0 +1,151 @@
+# A simple network that has "Conv2D" + "Mul"
+node {
+  name: "Placeholder"
+  op: "Placeholder"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "shape"
+    value {
+      shape {
+        dim {
+          size: 1
+        }
+        dim {
+          size: 3
+        }
+        dim {
+          size: 3
+        }
+        dim {
+          size: 5
+        }
+      }
+    }
+  }
+}
+node {
+  name: "weights"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_FLOAT
+        tensor_shape {
+          dim {
+            size: 2
+          }
+          dim {
+            size: 2
+          }
+          dim {
+            size: 5
+          }
+          dim {
+            size: 2
+          }
+        }
+        float_val: 1.100000023841858
+      }
+    }
+  }
+}
+node {
+  name: "Conv2D"
+  op: "Conv2D"
+  input: "Placeholder"
+  input: "weights"
+  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: 1
+        i: 1
+        i: 1
+      }
+    }
+  }
+  attr {
+    key: "use_cudnn_on_gpu"
+    value {
+      b: true
+    }
+  }
+}
+node {
+  name: "mulparam"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_FLOAT
+        tensor_shape {
+          dim {
+            size: 2
+          }
+        }
+        float_val: 2.0
+      }
+    }
+  }
+}
+node {
+  name: "Mul"
+  op: "Mul"
+  input: "Conv2D"
+  input: "mulparam"
+  attr {
+    key: "T"
+    value {
+      type: DT_FLOAT
+    }
+  }
+}
diff --git a/res/TensorFlowTests/NET_0008/test.info b/res/TensorFlowTests/NET_0008/test.info
new file mode 100644 (file)
index 0000000..ccdd6fd
--- /dev/null
@@ -0,0 +1,2 @@
+input, Placeholder:0, TF_FLOAT, [1, 3, 3, 5]
+output, Add:0, TF_FLOAT, [1, 3, 3, 2]
diff --git a/res/TensorFlowTests/NET_0008/test.pbtxt b/res/TensorFlowTests/NET_0008/test.pbtxt
new file mode 100644 (file)
index 0000000..bbaba7d
--- /dev/null
@@ -0,0 +1,151 @@
+# A simple network that has "Conv2D" + "Add"
+node {
+  name: "Placeholder"
+  op: "Placeholder"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "shape"
+    value {
+      shape {
+        dim {
+          size: 1
+        }
+        dim {
+          size: 3
+        }
+        dim {
+          size: 3
+        }
+        dim {
+          size: 5
+        }
+      }
+    }
+  }
+}
+node {
+  name: "weights"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_FLOAT
+        tensor_shape {
+          dim {
+            size: 2
+          }
+          dim {
+            size: 2
+          }
+          dim {
+            size: 5
+          }
+          dim {
+            size: 2
+          }
+        }
+        float_val: 1.100000023841858
+      }
+    }
+  }
+}
+node {
+  name: "Conv2D"
+  op: "Conv2D"
+  input: "Placeholder"
+  input: "weights"
+  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: 1
+        i: 1
+        i: 1
+      }
+    }
+  }
+  attr {
+    key: "use_cudnn_on_gpu"
+    value {
+      b: true
+    }
+  }
+}
+node {
+  name: "addparam"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_FLOAT
+        tensor_shape {
+          dim {
+            size: 2
+          }
+        }
+        float_val: 2.0
+      }
+    }
+  }
+}
+node {
+  name: "Add"
+  op: "Add"
+  input: "Conv2D"
+  input: "addparam"
+  attr {
+    key: "T"
+    value {
+      type: DT_FLOAT
+    }
+  }
+}
diff --git a/res/TensorFlowTests/NET_0009/test.info b/res/TensorFlowTests/NET_0009/test.info
new file mode 100644 (file)
index 0000000..ccdd6fd
--- /dev/null
@@ -0,0 +1,2 @@
+input, Placeholder:0, TF_FLOAT, [1, 3, 3, 5]
+output, Add:0, TF_FLOAT, [1, 3, 3, 2]
diff --git a/res/TensorFlowTests/NET_0009/test.pbtxt b/res/TensorFlowTests/NET_0009/test.pbtxt
new file mode 100644 (file)
index 0000000..a4eee69
--- /dev/null
@@ -0,0 +1,194 @@
+# A simple network that has "Conv2D" + "BiasAdd" + "Add"
+node {
+  name: "Placeholder"
+  op: "Placeholder"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "shape"
+    value {
+      shape {
+        dim {
+          size: 1
+        }
+        dim {
+          size: 3
+        }
+        dim {
+          size: 3
+        }
+        dim {
+          size: 5
+        }
+      }
+    }
+  }
+}
+node {
+  name: "weights"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_FLOAT
+        tensor_shape {
+          dim {
+            size: 2
+          }
+          dim {
+            size: 2
+          }
+          dim {
+            size: 5
+          }
+          dim {
+            size: 2
+          }
+        }
+        float_val: 1.100000023841858
+      }
+    }
+  }
+}
+node {
+  name: "Conv2D"
+  op: "Conv2D"
+  input: "Placeholder"
+  input: "weights"
+  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: 1
+        i: 1
+        i: 1
+      }
+    }
+  }
+  attr {
+    key: "use_cudnn_on_gpu"
+    value {
+      b: true
+    }
+  }
+}
+node {
+  name: "BiasAdd/bias"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_FLOAT
+        tensor_shape {
+          dim {
+            size: 2
+          }
+        }
+        float_val: 1.0
+        float_val: 1.0
+      }
+    }
+  }
+}
+node {
+  name: "BiasAdd"
+  op: "BiasAdd"
+  input: "Conv2D"
+  input: "BiasAdd/bias"
+  attr {
+    key: "T"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "data_format"
+    value {
+      s: "NHWC"
+    }
+  }
+}
+node {
+  name: "addparam"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_FLOAT
+        tensor_shape {
+          dim {
+            size: 2
+          }
+        }
+        float_val: 2.0
+      }
+    }
+  }
+}
+node {
+  name: "Add"
+  op: "Add"
+  input: "BiasAdd"
+  input: "addparam"
+  attr {
+    key: "T"
+    value {
+      type: DT_FLOAT
+    }
+  }
+}
diff --git a/res/TensorFlowTests/NET_0010/test.info b/res/TensorFlowTests/NET_0010/test.info
new file mode 100644 (file)
index 0000000..bcbc418
--- /dev/null
@@ -0,0 +1,2 @@
+input, Placeholder:0, TF_FLOAT, [1, 3, 3, 2]
+output, Add:0, TF_FLOAT, [1, 3, 3, 2]
diff --git a/res/TensorFlowTests/NET_0010/test.pbtxt b/res/TensorFlowTests/NET_0010/test.pbtxt
new file mode 100644 (file)
index 0000000..b9c6c99
--- /dev/null
@@ -0,0 +1,109 @@
+# A simple network that has "BiasAdd" + "Add"
+node {
+  name: "Placeholder"
+  op: "Placeholder"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "shape"
+    value {
+      shape {
+        dim {
+          size: 1
+        }
+        dim {
+          size: 3
+        }
+        dim {
+          size: 3
+        }
+        dim {
+          size: 2
+        }
+      }
+    }
+  }
+}
+node {
+  name: "bias_add_01/bias"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_FLOAT
+        tensor_shape {
+          dim {
+            size: 2
+          }
+        }
+        float_val: 1.0
+        float_val: -1.0
+      }
+    }
+  }
+}
+node {
+  name: "bias_add_01"
+  op: "BiasAdd"
+  input: "Placeholder"
+  input: "bias_add_01/bias"
+  attr {
+    key: "T"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "data_format"
+    value {
+      s: "NHWC"
+    }
+  }
+}
+node {
+  name: "addparam"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_FLOAT
+        tensor_shape {
+          dim {
+            size: 2
+          }
+        }
+        float_val: 2.0
+      }
+    }
+  }
+}
+node {
+  name: "Add"
+  op: "Add"
+  input: "bias_add_01"
+  input: "addparam"
+  attr {
+    key: "T"
+    value {
+      type: DT_FLOAT
+    }
+  }
+}
diff --git a/res/TensorFlowTests/NET_0011/test.info b/res/TensorFlowTests/NET_0011/test.info
new file mode 100644 (file)
index 0000000..7fb5ec2
--- /dev/null
@@ -0,0 +1,2 @@
+input,  placeholder:0, TF_FLOAT, [2]
+output, concat_out:0, TF_FLOAT, [6]
diff --git a/res/TensorFlowTests/NET_0011/test.pbtxt b/res/TensorFlowTests/NET_0011/test.pbtxt
new file mode 100644 (file)
index 0000000..a44aba7
--- /dev/null
@@ -0,0 +1,129 @@
+# A simple network that includes constant foldable subgraph
+# (note: [] indicates shape, () indicates real value)
+#
+#       input1 (const) -- relu -+     placeholder --+
+#       (-1, 1)          (0, 1) |       shape [2]   |
+#                               |                   |
+#               input2 (const) -+-- concat -------- concat_out
+#               (2, 3)          |   (0, 1, 2, 3)    |
+#                               |                   |
+#                  axis (const)-+-------------------+
+#
+#  will be the following after constant folding:
+#
+#                                           Pull --+
+#                                      shape [2]   |
+#                                                  |
+#                                  ConstGen------- TensorConcat -- Push
+#                                  (0, 1, 2, 3)      shape [6]
+#
+node {
+  name: "input1"
+  op: "Const"
+  attr {
+    key: "dtype" value { type: DT_FLOAT }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_FLOAT
+        tensor_shape { dim { size: 2 } }
+        float_val: -1
+        float_val: 1
+      }
+    }
+  }
+}
+node {
+  name: "relu"
+  op: "Relu"
+  input: "input1"
+  attr { key: "T" value { type: DT_FLOAT } }
+}
+node {
+  name: "input2"
+  op: "Const"
+  attr {
+    key: "dtype" value { type: DT_FLOAT }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_FLOAT
+        tensor_shape { dim { size: 2 } }
+        float_val: 2
+        float_val: 3
+      }
+    }
+  }
+}
+node {
+  name: "axis"
+  op: "Const"
+  attr { key: "dtype" value { type: DT_INT32 } }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_INT32
+        tensor_shape { }
+        int_val: 0
+      }
+    }
+  }
+}
+node {
+  name: "concat"
+  op: "ConcatV2"
+  input: "relu"
+  input: "input2"
+  input: "axis"
+  attr {
+    key: "N"
+    value { i: 2 }
+  }
+  attr {
+    key: "T"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "Tidx"
+    value { type: DT_INT32 }
+  }
+}
+node {
+  name: "placeholder"
+  op: "Placeholder"
+  attr {
+    key: "dtype" value { type: DT_FLOAT }
+  }
+  attr {
+    key: "shape"
+    value {
+      shape {
+        dim { size: 2 }
+      }
+    }
+  }
+}
+node {
+  name: "concat_out"
+  op: "ConcatV2"
+  input: "concat"
+  input: "placeholder"
+  input: "axis"
+  attr {
+    key: "N"
+    value { i: 2 }
+  }
+  attr {
+    key: "T"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "Tidx"
+    value { type: DT_INT32 }
+  }
+}
diff --git a/res/TensorFlowTests/NET_0012/test.info b/res/TensorFlowTests/NET_0012/test.info
new file mode 100644 (file)
index 0000000..b210407
--- /dev/null
@@ -0,0 +1,2 @@
+input,  placeholder:0, TF_FLOAT, [6]
+output, reshape:0,     TF_FLOAT, [3, 2]
diff --git a/res/TensorFlowTests/NET_0012/test.pbtxt b/res/TensorFlowTests/NET_0012/test.pbtxt
new file mode 100644 (file)
index 0000000..387dc92
--- /dev/null
@@ -0,0 +1,52 @@
+# Network with dynamic reshape which has resolvable wildcard dimension
+node {
+  name: "placeholder"
+  op: "Placeholder"
+  attr {
+    key: "dtype"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "shape"
+    value {
+      shape {
+        dim { size: 6 }
+      }
+    }
+  }
+}
+node {
+  name: "shape"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value { type: DT_INT32 }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_INT32
+        tensor_shape {
+          dim { size: 2 }
+        }
+        int_val: -1
+        int_val: 2
+      }
+    }
+  }
+}
+node {
+  name: "reshape"
+  op: "Reshape"
+  input: "placeholder"
+  input: "shape"
+  attr {
+    key: "T"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "Tshape"
+    value { type: DT_INT32 }
+  }
+}
diff --git a/res/TensorFlowTests/NET_0013/test.info b/res/TensorFlowTests/NET_0013/test.info
new file mode 100644 (file)
index 0000000..137cdfa
--- /dev/null
@@ -0,0 +1,2 @@
+input,  Placeholder:0,  TF_FLOAT,   [6]
+output, Reshape:0,      TF_FLOAT,   [2, 3]
diff --git a/res/TensorFlowTests/NET_0013/test.pbtxt b/res/TensorFlowTests/NET_0013/test.pbtxt
new file mode 100644 (file)
index 0000000..a9c6aff
--- /dev/null
@@ -0,0 +1,72 @@
+# Network containing Shape node, which becomes Reshape's 'shape' input
+# Note that this is a work-around to test Shape
+#
+#                (tensor)
+#   Placeholder ---------- Reshape 
+#                        /
+#     Const --- Shape ---
+#                      (shape)
+node {
+  name: "Placeholder"
+  op: "Placeholder"
+  attr {
+    key: "dtype"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "shape"
+    value {
+      shape {
+        dim { size: 6 }
+      }
+    }
+  }
+}
+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 }
+        }
+        float_val: 1.0
+      }
+    }
+  }
+}
+node {
+  name: "Shape"
+  op: "Shape"
+  input: "Const"
+  attr {
+    key: "T"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "out_type"
+    value { type: DT_INT32 }
+  }
+}
+node {
+  name: "Reshape"
+  op: "Reshape"
+  input: "Placeholder"
+  input: "Shape"
+  attr {
+    key: "T"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "Tshape"
+    value { type: DT_INT32 }
+  }
+}
diff --git a/res/TensorFlowTests/NET_0014/test.info b/res/TensorFlowTests/NET_0014/test.info
new file mode 100644 (file)
index 0000000..d3ea85a
--- /dev/null
@@ -0,0 +1,2 @@
+input,  placeholder:0,  TF_FLOAT,   [2, 1, 1, 3]
+output, reshape_2:0,    TF_FLOAT,   [2, 3]
diff --git a/res/TensorFlowTests/NET_0014/test.pbtxt b/res/TensorFlowTests/NET_0014/test.pbtxt
new file mode 100644 (file)
index 0000000..d4bc8e6
--- /dev/null
@@ -0,0 +1,106 @@
+# Mock of the Epilogue, using ReLU instead of Softmax
+node {
+  name: "placeholder"
+  op: "Placeholder"
+  attr {
+    key: "dtype"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "shape"
+    value {
+      shape {
+        dim { size: 2 }
+        dim { size: 1 }
+        dim { size: 1 }
+        dim { size: 3 }
+      }
+    }
+  }
+}
+node {
+  name: "squeeze"
+  op: "Squeeze"
+  input: "placeholder"
+  attr {
+    key: "T"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "squeeze_dims"
+    value {
+      list { i: 1 i: 2 }
+    }
+  }
+}
+node {
+  name: "Reshape/shape"
+  op: "Const"
+  attr {
+    key: "dtype"
+    value { type: DT_INT32 }
+  }
+  attr {
+    key: "value"
+    value {
+      tensor {
+        dtype: DT_INT32
+        tensor_shape {
+          dim { size: 2 }
+        }
+        int_val: -1
+        int_val: 3
+      }
+    }
+  }
+}
+node {
+  name: "reshape_1"
+  op: "Reshape"
+  input: "squeeze"
+  input: "Reshape/shape"
+  attr {
+    key: "T"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "Tshape"
+    value { type: DT_INT32 }
+  }
+}
+node {
+  name: "relu"
+  op: "Relu"
+  input: "reshape_1"
+  attr {
+    key: "T"
+    value { type: DT_FLOAT }
+  }
+}
+node {
+  name: "shape"
+  op: "Shape"
+  input: "squeeze"
+  attr {
+    key: "T"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "out_type"
+    value { type: DT_INT32 }
+  }
+}
+node {
+  name: "reshape_2"
+  op: "Reshape"
+  input: "relu"
+  input: "shape"
+  attr {
+    key: "T"
+    value { type: DT_FLOAT }
+  }
+  attr {
+    key: "Tshape"
+    value { type: DT_INT32 }
+  }
+}
diff --git a/res/TensorFlowTests/NET_0015/test.info b/res/TensorFlowTests/NET_0015/test.info
new file mode 100644 (file)
index 0000000..dbbef9b
--- /dev/null
@@ -0,0 +1,2 @@
+input,  Placeholder:0,   TF_FLOAT,   [2, 3]
+output, as_rsqrt:0,      TF_FLOAT,   [2, 3]
diff --git a/res/TensorFlowTests/NET_0015/test.pbtxt b/res/TensorFlowTests/NET_0015/test.pbtxt
new file mode 100644 (file)
index 0000000..3d994e8
--- /dev/null
@@ -0,0 +1,74 @@
+# A simple network that simulates Rsqrt: 1.0 / Sqrt(input)
+node {
+  name: "Placeholder"
+  op: "Placeholder"
+  attr {
+    key: "dtype"
+    value {
+      type: DT_FLOAT
+    }
+  }
+  attr {
+    key: "shape"
+    value {
+      shape {
+        dim {
+          size: 2
+        }
+        dim {
+          size: 3
+        }
+      }
+    }
+  }
+}
+node {
+  name: "SQRT_02"
+  op: "Sqrt"
+  input: "Placeholder"
+  attr {
+    key: "T"
+    value {
+      type: DT_FLOAT
+    }
+  }
+}
+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
+          }
+        }
+        float_val: 1.0
+      }
+    }
+  }
+}
+node {
+  name: "as_rsqrt"
+  op: "RealDiv"
+  input: "Const"
+  input: "SQRT_02"
+  attr {
+    key: "T"
+    value {
+      type: DT_FLOAT
+    }
+  }
+}