我的密码
<html>
<head>
<!-- Load TensorFlow.js -->
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs"></script>
<!-- Load Posenet -->
<script src="https://cdn.jsdelivr.net/npm/@tensorflow-models/posenet"></script>
</head>
<body>
<img id='cat' src='./pose/images/aa_085.jpg'/>
</body>
<!-- Place your code in the script tag below. You can also use an external .js file -->
<script>
var flipHorizontal = false;
var imageElement = document.getElementById('cat');
posenet.load().then(function(net) {
const pose = net.estimateSinglePose(imageElement, {
flipHorizontal: true
});
return pose;
}).then(function(pose){
console.log(pose);
})
</script>
</html>
很少使用HTML和JS,几乎忘记了最基本的知识,有人可以指出我的傻瓜吗?附有错误信息。
DevTools无法加载SourceMap:无法加载https://cdn.jsdelivr.net/npm/@tensorflow/tf.min.js.map的内容:HTTP错误:状态码404,net :: ERR_HTTP_RESPONSE_CODE_FAILURE
这就是对我有用的东西:
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs"></script>
尝试
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs/dist/tf.min.js"> </script>
更改之后,我再也看不到错误了。