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.

javascript tensorflow machine-learning deep-learning

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

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.

Integrating Tensorflow and Qiskit for Quantum Machine Learning

Integrating Tensorflow and Qiskit for Quantum Machine Learning: Taking a step towards quantum machine learning. In this article, we will be talking about integrating Qiskit in custom Keras layers.

Create a Deep Learning Library in JavaScript from Scratch

Welcome to the third part of this series on building deep learning library. In the first part of the series, we talked about the basic building blocks of all deep learning libraries.

What is Supervised Machine Learning

What is neuron analysis of a machine? Learn machine learning by designing Robotics algorithm. Click here for best machine learning course models with AI

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.