<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>TensorSpace - Hello World</title>
  <meta name="author" content="syt123450 / https://github.com/syt123450">

  <script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/101/three.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/tween.js/17.2.0/Tween.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/tensorflow/1.1.0/tf.min.js"></script>
  <script src="https://tensorspace.org/assets/jslib/TrackballControls.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/tensorspace@0.6.0/dist/tensorspace.min.js"></script>

  <script src="https://raw.githack.com/syt123450/tensorspace-data/master/data/5.js"></script>

</head>

<body>

  <div id="container"></div>

</body>

</html>
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

#container {
  width: 100%;
  height: 100%;
}
let modelContainer = document.getElementById("container");
let model = new TSP.models.Sequential(modelContainer);

model.add(new TSP.layers.GreyscaleInput());
model.add(new TSP.layers.Padding2d());
model.add(new TSP.layers.Conv2d());
model.add(new TSP.layers.Pooling2d());
model.add(new TSP.layers.Conv2d());
model.add(new TSP.layers.Pooling2d());
model.add(new TSP.layers.Dense());
model.add(new TSP.layers.Dense());
model.add(new TSP.layers.Output1d({
  outputs: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
}));

model.load({
  type: "tfjs",
  url: "https://tensorspace.org/assets/model/lenet/mnist.json"
});
model.init(function() {
  model.predict(data5);
  console.log("Hello World from TensorSpace!");
});

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.