GithubHelp home page GithubHelp logo

mwdchang / tfjs-gan Goto Github PK

View Code? Open in Web Editor NEW
61.0 5.0 19.0 11.29 MB

Simple GAN example using tensorflow JS core

Home Page: https://mwdchang.github.io/tfjs-gan/

JavaScript 68.98% HTML 29.22% CSS 1.79%
generative-adversarial-network tensorflow-js neural-network

tfjs-gan's Introduction

TensorflowJS GAN

A Generative Adversarial Network example generating hand-written digits, using just TensorflowJS APIs and vanilla javascript.

Source files

  • index.html: UI
  • gan.js: GAN code and hyper params
  • image-util.js: Image utility
  • data.js: Used to load MNIST dataset into compatible tensors, taken from tensorflow examples.
  • weights.js: Pre-trained weights/biases for the Generator.

tfjs-gan's People

Contributors

mwdchang 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

Watchers

 avatar  avatar  avatar  avatar  avatar

tfjs-gan's Issues

GPU memory crash

Hi @mwdchang, thank you for the awesome repo!

I modified your example to train with some black and white images of hand drawn curves, just for my own learning purposes.

My images are 50x50, so they are a bit bigger than the MNIST images. I'm running into a problem where Chrome's GPU process crashes after a couple of training iterations.

Looking at the Chrome task manager, I noticed that the GPU process retains memory and never garbage collects after training.

Do you have any suggestions? I was thinking about caching the weights but I was not sure how to do that.

Thanks again

[Question]: Make DC GAN

Hi man, great work. I'm trying to make a GAN or a DCGAN for learning.
Taking from your project, should i just replace the gen and disReal and have my deep convolution models there? I'm following a python project but sometimes it's hard to "port" the ideas to tfjs.

I want to input my own images for training and have it output a larger image. How big you would say it's feasible? 128, 256, more? It becomes computationally very expensive right?

Thanks,
Tiago Vasconcelos

Update to TFJS version 1.1.2

Great example. I really appreciate the live githubPages pure javascript format.

Getting zeroslike errors when updating to TFJS v1.1.2 any suggestions?

Works fine on Version 0.15.3, but breaks at Version 1.0.0

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.