Giter Club home page Giter Club logo

97-tensorflowjs-quick-start's Introduction

Tensorflow.js MNIST Angular Demo

Watch the screencast

This demo imports an MNIST ConvNet trained in Keras Python, then makes predictions with TensorFlow.js

  • clone it, cd into it, npm install && ng serve

Use a Different Keras Model

tensorflowjs_converter --input_format keras keras/yourWeights.h5 src/assets

97-tensorflowjs-quick-start's People

Contributors

codediodeio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

97-tensorflowjs-quick-start's Issues

SyntaxError loading the model

I tried to do the example from scratch, but on the line:

this.model = await tf.loadModel('/assets/model.json');

I'm getting this error:

SyntaxError: Unexpected token < in JSON at position 0

In my assets folder I just copy/pasted the same assets that this repo:

assets
├── group1-shard1of1
├── group2-shard1of1
├── group3-shard1of2
├── group3-shard2of2
├── group4-shard1of1
└── model.json

And the file that contains the line:

this.model = await tf.loadModel('/assets/model.json');

is in the same level than assets.

Any idea about why is happening this? I would like to load the model 😄

Thanks!

Bar chart not working on build, or how to make tensorflowjs models local.

Hi, I'm looking for a way to make tensorflow(js) models as portable as possible.

The only problem i have at the moment is that the bar chart showing the results of the tfjs model does not seem to be working. The linear model output is showing fine, but the bar chart is not.
It works fine in ng serve but building the webapp with and without "--prod" does not. href is pointing at "dist/assets".

Is there any way to make such apps completely local? because even the official tensorflowjs examples (those that work) need something like npm to create a server.

Thanks for the help :)

capture

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.