Skip to content

Instantly share code, notes, and snippets.

View AshleyJaneLewis's full-sized avatar

Ashley Jane Lewis AshleyJaneLewis

View GitHub Profile
<!--
Copyright (c) 2018 ml5
This software is released under the MIT License.
https://opensource.org/licenses/MIT
-->
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="https://ml5js.github.io/ml5-homepage-demo/css/style.css">
@AshleyJaneLewis
AshleyJaneLewis / ml5_medium_example3
Created February 16, 2019 23:48
Image Classifier Example
<!--
Copyright (c) 2018 ml5
This software is released under the MIT License.
https://opensource.org/licenses/MIT
-->
<html>
<head>
@AshleyJaneLewis
AshleyJaneLewis / ml5_medium_example2
Created February 16, 2019 23:44
Image Classification
let classifier = new ml5.ImageClassifier('MobileNet');
@AshleyJaneLewis
AshleyJaneLewis / ml5_medium_example1
Created February 16, 2019 23:32
Tensor Flow Getting Started Example for ml5 Medium
// Tiny TFJS train / predict example.
async function myFirstTfjs() {
// Create a simple model.
const model = tf.sequential();
model.add(tf.layers.dense({units: 1, inputShape: [1]}));
// Prepare the model for training: Specify the loss and the optimizer.
model.compile({
loss: 'meanSquaredError',
optimizer: 'sgd'