constinput = tf.input({shape: [4, 3]}); constreshapeLayer = tf.layers.reshape({targetShape: [2, 6]}); // Inspect the inferred output shape of the Reshape layer, which // equals `[null, 2, 6]`. (The 1st dimension is the undermined batch size.) console.log(JSON.stringify(reshapeLayer.apply(input).shape));
Input shape:
Arbitrary, although all dimensions in the input shape must be fixed.
Use the configuration inputShape when using this layer as the
first layer in a model.
Reshapes an input to a certain shape.
Input shape: Arbitrary, although all dimensions in the input shape must be fixed. Use the configuration
inputShape
when using this layer as the first layer in a model.Output shape: [batchSize, targetShape[0], targetShape[1], ..., targetShape[targetShape.length - 1]].