import * as tf from
"@tensorflow/tfjs"
;
const input = tf.input({ shape: [4, 4, 1] });
const maxPoolingLayer =
tf.layers.maxPooling2d({ poolSize: [3, 3] });
const output = maxPoolingLayer.apply(input);
const model = tf.model({ inputs: input, outputs: output });
const x = tf.tensor4d([1, 2, 3, 4, 5, 6, 7,
8, 9, 10, 11, 12, 13, 14, 15, 16], [1, 4, 4, 1]);
model.predict(x).print();