What is the difference between tf.concat and tf.stack in TensorFlow?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
tf.concat combines data on existing dimensions without creating a new dimension. The only condition is that the non-concatenated dimensions must all be the same length.
tf.stack When merging data, tf.stack creates a new dimension and utilizes the parameter axis to define where to place the new dimension. When an axis is a positive number, a new dimension is added in front of the axis. When the axis is negative, a new dimension is added in the next place.