• 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:

    const input1 = tf.input({shape: [2, 2]});
    const input2 = tf.input({shape: [2, 3]});
    const concatLayer = tf.layers.concatenate();
    const output = 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).

    Parameters

    • Optional args: ConcatenateLayerArgs

    Returns Concatenate

    Doc

Generated using TypeDoc