diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..00c77e6 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // 使用 IntelliSense 了解相关属性。 + // 悬停以查看现有属性的描述。 + // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "chrome", + "request": "launch", + "name": "Launch Chrome against localhost", + "url": "http://localhost:8010", + "webRoot": "/" + } + ] +} \ No newline at end of file diff --git a/docs/123.png b/docs/123.png new file mode 100644 index 0000000..f54bf48 Binary files /dev/null and b/docs/123.png differ diff --git a/index.html b/index.html index 7c76dfe..d1166ad 100644 --- a/index.html +++ b/index.html @@ -9,7 +9,7 @@
-
@@ -76,7 +76,7 @@
// 告诉机器每一类对应的是什么(即让机器认识图片的过程)
const carNameList = ["奥迪", "奔驰", "宝马", "本田", "别克", "比亚迪", "保时捷", "大众", "哈弗"];
const x = convnetjs.img_to_vol(document.getElementById('some_image'));
- // console.log(net.forward(x));
+ console.log(net.forward(x),x);
const result = Array.from(net.forward(x).w);
let max = Math.max.apply(Math, result);
console.log("最有可能的那个汽车logo🚗", carNameList[result.indexOf(max)])