It takes a list of tensors, all of the same shape except for the
concatenation axis, and returns a single tensor, the concatenation
of all inputs. For example:
constinput1 = tf.input({shape: [2, 2]}); constinput2 = tf.input({shape: [2, 3]}); constconcatLayer = tf.layers.concatenate(); constoutput = concatLayer.apply([input1, input2]); console.log(JSON.stringify(output.shape)); // You get [null, 2, 5], with the first dimension as the undetermined batch // dimension. The last dimension (5) is the result of concatenating the // last dimensions of the inputs (2 and 3).
Layer that concatenates an
Array
of inputs.It takes a list of tensors, all of the same shape except for the concatenation axis, and returns a single tensor, the concatenation of all inputs. For example: