Iterating a tensor

After preprocessing my images and converting them into a tensor, I aim to detect faces in each image and generate face descriptors for each detected face.how can i access the elements in my tensor
i am new to tensorflow.js .thank you

Hi @IMEN_BAJAR, To get values for a tensor, Please try with the below given code

const tf = require('@tensorflow/tfjs');
import * as tf from "@tensorflow/tfjs"
const tn = tf.tensor([5, 6, 3, 4]);
const res = await tn.array();
console.log(res)

Thank You!