Uncaught (in promise) TypeError: t is not a function

Uncaught (in promise) TypeError: t is not a function

When I added Image to my classifier for training then it throws some exceptions. We are using the Mobilenet model of ml5.js in which when we call train() method.

When I added Image to my classifier for training then it throws some exceptions. We are using the Mobilenet model of ml5.js in which when we call train() method.

    let features =  ml5.featureExtractor('MobileNet');
    const classifier = features.classification();
    console.log("setup classifier DONE", classifier);

var img2;
console.log("adding images");
const gorra = new Image();
gorra.src = "https://ml5js.org/docs/assets/img/bird.jpg";
gorra.width = 224;
gorra.height = 224;
console.log("adding images DONE", gorra);

img2 = new Image();
img2.src = "{!$Resource.cat}"
img2.width = 224;
img2.height = 224;
console.log(img2);

var img3;
img3 = new Image();
img3.src = "{!$Resource.car}"
img3.width = 224;
img3.height = 224;
console.log(img3);
console.log("setup classifier");

var img4;
img4 = new Image();
img4.src = "{!$Resource.car1}"
img4.width = 224;
img4.height = 224;
console.log(img4);

console.log("setup classifier");
console.log("adding example image...");
const ex =  classifier.addImage(document.getElementById('imgshow'), "Gorra");
console.log("adding ex image DONE!...", ex);
const ex1 =  classifier.addImage(img2, "Gorra");
console.log("adding ex1 image DONE!...", ex1);
const ex2 =  classifier.addImage(img3, "car");
console.log("adding ex1 image DONE!...", ex2);
const ex3 =  classifier.addImage(img4, "car");
console.log("adding ex1 image DONE!...", ex3);
console.log('claasifier'+classifier);
console.log("Training");
// const trainer ;
setTimeout(function(){ const trainer = classifier.train(); console.log("Training DONE", trainer);}, 30000);

after adding image whenever train() run it throws this error enter image description here which is taking reference of Mobilnet.js library, I have highlighted the line where it causes that error enter image description here

please let me know, how can we resolve this.

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Learn TensorFlow.js - Deep Learning and Neural Networks with JavaScript

This full course introduces the concept of client-side artificial neural networks. We will learn how to deploy and run models along with full deep learning applications in the browser! To implement this cool capability, we’ll be using TensorFlow.js (TFJS), TensorFlow’s JavaScript library.

Machine Learning in JavaScript with TensorFlow.js

TensorFlow.js is a library for Machine Learning in JavaScript. Develop ML models in JavaScript, and use ML directly in the browser or in Node.js. Interested in using Machine Learning in JavaScript applications and websites? If you’re a Javascript developer who’s new to ML, TensorFlow.js is a great way to begin learning. Or, if you’re a ML developer who’s new to Javascript, read on to learn more about new opportunities for in-browser ML.

Machine Learning in JavaScript with TensorFlow.js

Machine Learning in JavaScript with TensorFlow.js