Machine Learning, TensorFlow, JavaScript, Javascript Development, Tensorflowjs.
lossTensor = model.evaluate(testingFeatureTensor, testingLabelTensor); const loss = await lossTensor.dataSync(); console.log(`Testing loss: ${loss}`); One thing to be noted is in the creation of model, for n number of features, the input dimension should also be n. In our case inputDim should be 2.