For this Humanpose Tensorflow network, network_cmu and base, it accepts only NHWC input format. If I construct the network in NCHW format, there is error as
Depth of input (32) is not a multiple of input depth of filter (3) for 'conv1_1/Conv2D' (op: 'Conv2D') with input shapes: [1,3,24,32], [3,3,3,64].
My code to construct the network is
import tensorflow as tf
import numpy as np
from network_cmu import CmuNetwork
def main():
#print(tensor_util.MakeNdarray(n.attr['value'].tensor))
placeholder_input = tf.placeholder(dtype=tf.float32, shape=(1, 3, 24, 32), name="image")
net = CmuNetwork({'image': placeholder_input}, trainable=False)
# Add an op to initialize the variables.
init_op = tf.global_variables_initializer()
saver = tf.train.Saver()
init_op = tf.global_variables_initializer()
with tf.Session() as sess:
sess.run(init_op)
#for n in tf.get_default_graph().as_graph_def().node:
# print(n.name)
save_path = saver.save(sess, "cmuThreeOutputs/model.ckpt")
if __name__ == '__main__':
main()
What should I change to have network in NCHW format?