+++ /dev/null
-input, placeholder:0, TF_FLOAT, [1, 8, 8, 1]
-output, avgpool2d:0, TF_FLOAT, [1, 1, 1, 1]
+++ /dev/null
-# HOW TO GENERATE:
-#
-# import tensorflow as tf
-# value = tf.placeholder(dtype=tf.float32, shape=[1, 8, 8, 1], name='placeholder')
-# output = tf.nn.avg_pool(value, [1, 8, 8, 1], [1, 1, 1, 1], 'VALID', name='avgpool2d')
-# tf.get_default_graph().as_graph_def()
-#
-# NOTE 1. The output shape is 1x1x1x1
-#
-# >>> tf.graph_util.tensor_shape_from_node_def_name(tf.get_default_graph(), 'avgpool2d')
-# TensorShape([Dimension(1), Dimension(1), Dimension(1), Dimension(1)])
-#
-# NOTE 2. This test corresponds to the last AvgPool node inception v3 2018.04.27.
-node {
- name: "placeholder"
- op: "Placeholder"
- attr {
- key: "dtype"
- value { type: DT_FLOAT }
- }
- attr {
- key: "shape"
- value {
- shape {
- dim { size: 1 }
- dim { size: 8 }
- dim { size: 8 }
- dim { size: 1 }
- }
- }
- }
-}
-node {
- name: "avgpool2d"
- op: "AvgPool"
- input: "placeholder"
- attr {
- key: "T"
- value { type: DT_FLOAT }
- }
- attr {
- key: "data_format"
- value { s: "NHWC" }
- }
- attr {
- key: "ksize"
- value {
- list { i: 1 i: 8 i: 8 i: 1 }
- }
- }
- attr {
- key: "padding"
- value { s: "VALID" }
- }
- attr {
- key: "strides"
- value {
- list { i: 1 i: 1 i: 1 i: 1 }
- }
- }
-}
+++ /dev/null
-input, placeholder:0, TF_FLOAT, [1, 4, 4, 1]
-output, avgpool2d:0, TF_FLOAT, [1, 4, 4, 1]
+++ /dev/null
-# HOW TO GENERATE:
-#
-# import tensorflow as tf
-# value = tf.placeholder(dtype=tf.float32, shape=[1, 4, 4, 1], name='placeholder')
-# output = tf.nn.avg_pool(value, [1, 3, 3, 1], [1, 1, 1, 1], 'SAME', name='avgpool2d')
-# tf.get_default_graph().as_graph_def()
-#
-# NOTE 1. The output shape is 1x4x4x1
-#
-# >>> tf.graph_util.tensor_shape_from_node_def_name(tf.get_default_graph(), 'avgpool2d')
-# TensorShape([Dimension(1), Dimension(4), Dimension(4), Dimension(1)])
-#
-# NOTE 2. Almost all the AvgPool nodes in inception v3 2018.04.27 use this configuration.
-#
-# The only exception is "InceptionV3/Logits/AvgPool_1a_8x8/AvgPool" which performs global average pooling.
-node {
- name: "placeholder"
- op: "Placeholder"
- attr {
- key: "dtype"
- value { type: DT_FLOAT }
- }
- attr {
- key: "shape"
- value {
- shape {
- dim { size: 1 }
- dim { size: 4 }
- dim { size: 4 }
- dim { size: 1 }
- }
- }
- }
-}
-node {
- name: "avgpool2d"
- op: "AvgPool"
- input: "placeholder"
- attr {
- key: "T"
- value { type: DT_FLOAT }
- }
- attr {
- key: "data_format"
- value { s: "NHWC" }
- }
- attr {
- key: "ksize"
- value {
- list { i: 1 i: 3 i: 3 i: 1 }
- }
- }
- attr {
- key: "padding"
- value { s: "SAME" }
- }
- attr {
- key: "strides"
- value {
- list { i: 1 i: 1 i: 1 i: 1 }
- }
- }
-}
+++ /dev/null
-input, ifm:0, TF_FLOAT, [1, 7, 7, 4]
-output, ofm:0, TF_FLOAT, [1, 3, 3, 6]
+++ /dev/null
-# HOW TO GENERATE:
-#
-# import tensorflow as tf
-# I = 4
-# O = 6
-# ifm = tf.placeholder(dtype=tf.float32, shape=[1, 7, 7, I], name='ifm')
-# ker = tf.constant(dtype=tf.float32, shape=[3, 3, I, O], name='ker', value=1.1)
-# ofm = tf.nn.conv2d(input=ifm, filter=ker, strides=[1, 2, 2, 1], padding='VALID', name='ofm')
-# tf.get_default_graph().as_graph_def()
-#
-# NOTE 1. The output shape is 1x3x3x6
-#
-# >>> tf.graph_util.tensor_shape_from_node_def_name(tf.get_default_graph(), 'ofm')
-# TensorShape([Dimension(1), Dimension(3), Dimension(3), Dimension(6)])
-#
-# NOTE 2. This test corresponds to "InceptionV3/InceptionV3/Conv2d_1a_3x3/Conv2D" node
-#
-node {
- name: "ifm"
- op: "Placeholder"
- attr {
- key: "dtype"
- value { type: DT_FLOAT }
- }
- attr {
- key: "shape"
- value {
- shape {
- dim { size: 1 }
- dim { size: 7 }
- dim { size: 7 }
- dim { size: 4 }
- }
- }
- }
-}
-node {
- name: "ker"
- op: "Const"
- attr {
- key: "dtype"
- value { type: DT_FLOAT }
- }
- attr {
- key: "value"
- value {
- tensor {
- dtype: DT_FLOAT
- tensor_shape {
- dim { size: 3 }
- dim { size: 3 }
- dim { size: 4 }
- dim { size: 6 }
- }
- 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: 2 i: 2 i: 1 }
- }
- }
-}
+++ /dev/null
-input, placeholder:0, TF_FLOAT, [2, 1, 1, 3]
-output, reshape_2:0, TF_FLOAT, [2, 3]
+++ /dev/null
-# The Epilogue, or endmost part of inception v3 comprised of Squeeze,
-# Reshape, Shape and Softmax
-#
-# Only difference from original is input shape:
-# - original has unknown batch and 1001 channels [?, 1, 1, 1001]
-# - this test has 2 batches and 3 channels [2, 1, 1, 3]
-
-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: "softmax"
- op: "Softmax"
- 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: "softmax"
- input: "shape"
- attr {
- key: "T"
- value { type: DT_FLOAT }
- }
- attr {
- key: "Tshape"
- value { type: DT_INT32 }
- }
-}
+++ /dev/null
-input, placeholder:0, TF_FLOAT, [1, 7, 7, 1]
-output, maxpool2d:0, TF_FLOAT, [1, 3, 3, 1]
+++ /dev/null
-# HOW TO GENERATE:
-#
-# import tensorflow as tf
-# value = tf.placeholder(dtype=tf.float32, shape=[1, 7, 7, 1], name='placeholder')
-# output = tf.nn.max_pool(value, [1, 3, 3, 1], [1, 2, 2, 1], 'VALID', name='maxpool2d')
-# tf.get_default_graph().as_graph_def()
-#
-# NOTE 1. The output shape is 1x3x3x1
-#
-# >>> tf.graph_util.tensor_shape_from_node_def_name(tf.get_default_graph(), 'maxpool2d')
-# TensorShape([Dimension(1), Dimension(3), Dimension(3), Dimension(1)])
-#
-# NOTE 2. All the MaxPool nodes in inception v3 2018.04.27 use this configuration.
-# - InceptionV3/InceptionV3/MaxPool_3a_3x3/MaxPool
-# - InceptionV3/InceptionV3/MaxPool_5a_3x3/MaxPool
-# - InceptionV3/InceptionV3/Mixed_6a/Branch_2/MaxPool_1a_3x3/MaxPool
-# - InceptionV3/InceptionV3/Mixed_7a/Branch_2/MaxPool_1a_3x3/MaxPool
-node {
- name: "placeholder"
- op: "Placeholder"
- attr {
- key: "dtype"
- value { type: DT_FLOAT }
- }
- attr {
- key: "shape"
- value {
- shape {
- dim { size: 1 }
- dim { size: 7 }
- dim { size: 7 }
- dim { size: 1 }
- }
- }
- }
-}
-node {
- name: "maxpool2d"
- 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: 3 i: 3 i: 1 }
- }
- }
- attr {
- key: "padding"
- value { s: "VALID" }
- }
- attr {
- key: "strides"
- value {
- list { i: 1 i: 2 i: 2 i: 1 }
- }
- }
-}