Thank you for your reply, but the error remains unsolved.
I think my codes written in train_step() function are quite straightforward and correct, but it still doesn’t work and gives the same error message.
Problem solved!
The problem was that I used the following code in compute_layer_style_cost function
_, n_H, n_W, n_C = tf.shape(a_G),
instead of using X.get_shape().as_list().
Again, thank you for your accurate and quick reply!