Uncaught ReferenceError
当我尝试加载这个脚本时,我得到了一个,有什么建议吗?
index.html:12 Uncaught ReferenceError: mobilenet is not defined at index.html:12
<html>
<head>
<title>Something else Introduction</title>
<!---- Import Script---->
<script src="https://unpkg.com/@tensorflow/tfjs@1.2.8" type="text/javascript" </script>
<script src="https://unpkg.com/@tensorflow-models/mobilenet@2.0.4" type="text/javascript"</script>
</head>
<body>
<img id="img" crossOrigin src = "https://i.imgur.com/e5KD2lt.jpg">
<h1 id="message">Hello, I'm a simple web page!</h1>
<script>
mobilenet.load().then(net => {
console.log('Model loaded to memory!')
const theImage = document.getElementById('img')
net.classify(theImage).then(result=> {
document.getElementById('message').innerText = `
Detected: ${result[0].className}
Probability: ${result[0].Probability}
`
})
})
</script>
</body>
</html>