// Importing libraries
import * as from "@tensorflow/tfjs"
// A tensor with values selected from a
// normal distribution
const x=tf.randomNormal([1,2,4,1,3]);
const kernel=tf.tensor5d([0.3,1.2,0.6,1.8,0.8,1.5],[1,1,2,3,1])
// Output tensor after convolution
let out=tf.conv3d(x,kernel,strides=[1,1,1,1,1],'same')
// Printing the output tensor
console.log('First output tensor is:')
out.print()
// Input tensor of bigger shape is taken
const y=tf.randomNormal([3,25,25,25,1]);
const kernel2=tf.randomNormal([1,3,3,1,1])
// Convolution is performed
let output2=tf.conv3d(y,kernel2,strides=[1,1,1,1,1],'same')
// Output2.print()
// Printing out the bigger output shape
console.log('\n The shape of the output tensor',output2.shape)