问题描述
我的代码
<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,几乎忘记了最基本的知识,有人可以指出我的傻瓜吗?附加了错误信息。
Rarely use HTML and JS, almost forget the most fundamentals, can any one kindly point out my fool? Error info attached.
DevTools无法加载SourceMap:无法加载:HTTP错误:状态码404,净值: :ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for https://cdn.jsdelivr.net/npm/@tensorflow/tf.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
推荐答案
这对我有用:
代替
This is what worked for me:instead of
< script src = https://cdn.jsdelivr.net/npm/@tensorflow/tfjs>< / script>
尝试
< script src = https://cdn.jsdelivr.net /npm/@tensorflow/tfjs/dist/tf.min.js\"> < / script>
更改之后,我再也看不到错误了。
After that change I am not seeing the error anymore.
这篇关于DevTools无法加载SourceMap:无法加载内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!