import * as tf from "@tensorflow/tfjs";
const input = tf.input({ shape: [2, 4, 4, 1] });
const conv3DLayer = tf.layers.conv3d({
filters: 2,
kernelSize: 2
});
const output = conv3DLayer.apply(input);
const model = tf.model({
inputs: input,
outputs: output
});
const x = tf.tensor5d([1, 2, 3, 4, 5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
30, 31, 32], [1, 2, 4, 4, 1]
);
model.predict(x).print();