I have a tensor whose shape is [B, L, C]. I need to reshape it to [B, L * C]. I've tried this: shape = tf.shape(x) item_vec = tf.reshape(x, [shape[0], shape[1] * shape[2]]) But while I put it into a tf.contrib.layers.fully_connected, it throw out an error: ValueError: The last dimension of the inputs to `Dense` should be defined. Found `None`. How can I fix that? Continue reading...