Differential Programming in JavaScript.

Overview

April 19, 2018

TensorFlow.js was recently released. It is well engineered, provides an autograd-style interface to backprop, and has committed to supporting Node. This satisfies our requirements. It is counterproductive to pursue a parallel effort. Thus we are abandoning our backprop implementation, TF C binding, and the TF/DL bridge, which made up the foundation of the Propel library. We intend to rebase our work on top of TFJS.

Our high-level goal continues to be a productive workflow for scientific computing in JavaScript. Building on top of TFJS allows us to focus on higher-level functionality.

We have no release at this time.

Comments
  • For review: add_ function

    For review: add_ function

    FIrst pass, looking for feedback and thoughts on the approach.

    Open question: I'm just returning x to add_. Is this sufficient or does x need to be protected?

    Let me know your thoughts!

    opened by ryanmurakami 23
  • Parcel upgrade to 1.6.x

    Parcel upgrade to 1.6.x

    Fixes #264 In Parcel 1.6x, there were some changes made where async functions are transformed to regeneratorRuntime, which is undefined. Used this issue to find a resolution: https://github.com/parcel-bundler/parcel/issues/871

    opened by ryanmurakami 14
  • error: use of undeclared identifier 'NAPI_AUTO_LENGTH' when installing on Linux

    error: use of undeclared identifier 'NAPI_AUTO_LENGTH' when installing on Linux

    After cloning, running npm install or ./tools/presubmit.js returns an error.

    I am running Arch Linux, and my kernel release is 4.12.13-1-ARCH.

    Here are the errors:

    npm install

    /home/adrien/Git/propel/build/Release/libtensorflow_framework.so
      CXX(target) Release/obj.target/tensorflow-binding/src/binding.o
    ../src/binding.cc: In function ‘napi_value__* HandleGetDevice(napi_env, napi_callback_info)’:
    ../src/binding.cc:743:50: error: ‘NAPI_AUTO_LENGTH’ was not declared in this scope
       nstatus = napi_create_string_utf8(env, device, NAPI_AUTO_LENGTH, &js_device);
                                                      ^~~~~~~~~~~~~~~~
    ../src/binding.cc:743:50: note: suggested alternative: ‘NAPI_NO_RETURN’
       nstatus = napi_create_string_utf8(env, device, NAPI_AUTO_LENGTH, &js_device);
                                                      ^~~~~~~~~~~~~~~~
                                                      NAPI_NO_RETURN
    ../src/binding.cc: In function ‘napi_value__* InitBinding(napi_env, napi_value)’:
    ../src/binding.cc:1049:7: error: ‘NAPI_AUTO_LENGTH’ was not declared in this scope
           NAPI_AUTO_LENGTH,  // JavasScript class name length
           ^~~~~~~~~~~~~~~~
    ../src/binding.cc:1049:7: note: suggested alternative: ‘NAPI_NO_RETURN’
           NAPI_AUTO_LENGTH,  // JavasScript class name length
           ^~~~~~~~~~~~~~~~
           NAPI_NO_RETURN
    In file included from ../src/binding.cc:15:0:
    ../src/binding.cc: At global scope:
    /home/adrien/.node-gyp/8.5.0/include/node/node_api.h:96:5: error: invalid conversion from ‘napi_value__* (*)(napi_env, napi_value) {aka napi_value__* (*)(napi_env__*, napi_value__*)}’ to ‘napi_addon_register_func {aka void (*)(napi_env__*, napi_value__*, napi_value__*, void*)}’ [-fpermissive]
         };                                                                \
         ^
    /home/adrien/.node-gyp/8.5.0/include/node/node_api.h:103:3: note: in expansion of macro ‘NAPI_MODULE_X’
       NAPI_MODULE_X(modname, regfunc, NULL, 0)
       ^~~~~~~~~~~~~
    ../src/binding.cc:1178:1: note: in expansion of macro ‘NAPI_MODULE’
     NAPI_MODULE(tensorflow_binding, InitBinding)
     ^~~~~~~~~~~
    make: *** [tensorflow-binding.target.mk:114: Release/obj.target/tensorflow-binding/src/binding.o] Error 1
    make: Leaving directory '/home/adrien/Git/propel/build'
    

    ./tools/presubmit.js

    Extracting libtensorflow_framework.so
    /home/adrien/Git/propel/build/Release/libtensorflow_framework.so
    clang -c -o Release/binding.o ../src/binding.cc -I/usr/include/node -I/home/adrien/Git/propel -I/home/adrien/Git/propel/deps/libtensorflow/include -Wall -W -Wno-unused-parameter -std=gnu++0x -DNODE_GYP_MODULE_NAME=tensorflow-binding -DUSING_UV_SHARED=1 -DUSING_V8_SHARED=1 -DV8_DEPRECATION_WARNINGS=1 -D_DARWIN_USE_64_BIT_INODE=1 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DBUILDING_NODE_EXTENSION -m64 -fPIC -pthread
    ../src/binding.cc:743:50: error: use of undeclared identifier 'NAPI_AUTO_LENGTH'
      nstatus = napi_create_string_utf8(env, device, NAPI_AUTO_LENGTH, &js_device);
                                                     ^
    ../src/binding.cc:1049:7: error: use of undeclared identifier 'NAPI_AUTO_LENGTH'
          NAPI_AUTO_LENGTH,  // JavasScript class name length
          ^
    ../src/binding.cc:1062:7: error: use of undeclared identifier 'NAPI_AUTO_LENGTH'
          NAPI_AUTO_LENGTH,  // JavasScript class name length
          ^
    ../src/binding.cc:1178:33: error: cannot initialize a member subobject of type 'napi_addon_register_func' (aka 'void (*)(napi_env__ *,
          napi_value__ *, napi_value__ *, void *)') with an lvalue of type 'napi_value (napi_env, napi_value)' (aka 'napi_value__ *(napi_env__ *,
          napi_value__ *)'): different number of parameters (4 vs 2)
    NAPI_MODULE(tensorflow_binding, InitBinding)
                                    ^~~~~~~~~~~
    /usr/include/node/node_api.h:103:26: note: expanded from macro 'NAPI_MODULE'
      NAPI_MODULE_X(modname, regfunc, NULL, 0)
                             ^~~~~~~
    /usr/include/node/node_api.h:92:7: note: expanded from macro 'NAPI_MODULE_X'
          regfunc,                                                        \
          ^~~~~~~
    
    opened by alaq 11
  • profile pages

    profile pages

    • [x] Created separate profile page per user.
    • [x] Added last three notebooks by logged in user to the top of /notebook
      • [x] If user has no notebook, message is displayed (maybe not display anything instead? no header?)
    • [x] User's names are clickable and redirecting to user's profile

    No error/warning in ./tools/tslint.js This addresses #297

    opened by alaq 9
  • Show interfaces in docs

    Show interfaces in docs

    Params wasn’t showing up as gendoc.ts wasnt visiting interfaces (#469 ).

    To show the interfaces in the docs I added visitClass in the ts.isInterfaceDeclaration check but to do this I had to change type signatures for visitClass, classElementName and visitProp - not sure if this is a bad way to do things :grimacing: I also added ts.isMethodSignature and ts.isPropertySignature checks to the visitClass function. ... Maybe there’s some nicer way to organise all this?

    This caused some interfaces from deps/ to show up (eg Array and Promise) so I filtered out nodes which contain the excludes from tsconfig.json in their declarations file paths.

    ConvOpts appears duplicated in the docs as it’s defined in both src/types.ts and src/layers.ts

    And I’m not sure why the MinimizeResult interface is showing up in the docs despite not being exported - is this expected?

    opened by dangerdak 5
  • Compile error

    Compile error

    in_alaska@xxxx propel (grid)⛺  ./tools/presubmit.js 
    Delete dir ./build
    node ./tools/cpplint.js
    python ./deps/cpplint/cpplint.py binding.cc check.h
    Done processing binding.cc
    Done processing check.h
    node ./tools/tslint.js
    node ./node_modules/tslint/bin/tslint -p /Users/in_alaska/propel
    node ./tools/stylelint.js
    node ./node_modules/stylelint/bin/stylelint.js --config stylelint.json website/main.scss website/normalize.scss website/skeleton.scss website/syntax.scss website/syntax_dark.scss website/syntax_light.scss 
    node ./tools/test.js
    node ./tools/build_binding.js
    mkdir /Users/in_alaska/propel/build
    mkdir /Users/in_alaska/propel/build/Release
    node tools/extract_so.js /Users/in_alaska/propel/build/Release
    outDir /Users/in_alaska/propel/build/Release
    Extracting /Users/in_alaska/propel/deps/libtensorflow/libtensorflow-cpu-darwin-x86_64.tar.gz
    Extracting libtensorflow.so
    /Users/in_alaska/propel/build/Release/libtensorflow.so
    Extracting libtensorflow_framework.so
    /Users/in_alaska/propel/build/Release/libtensorflow_framework.so
    clang -c -o Release/binding.o ../binding.cc -I/usr/local/include/node -I/Users/in_alaska/propel/deps/libtensorflow/include -Wall -W -Wno-unused-parameter -std=gnu++0x -DNODE_GYP_MODULE_NAME=tensorflow-binding -DUSING_UV_SHARED=1 -DUSING_V8_SHARED=1 -DV8_DEPRECATION_WARNINGS=1 -D_DARWIN_USE_64_BIT_INODE=1 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DBUILDING_NODE_EXTENSION -stdlib=libc++ -mmacosx-version-min=10.7 -arch x86_64 
    ../binding.cc:703:50: error: use of undeclared identifier 'NAPI_AUTO_LENGTH'
      nstatus = napi_create_string_utf8(env, device, NAPI_AUTO_LENGTH, &js_device);
                                                     ^
    ../binding.cc:1006:7: error: use of undeclared identifier 'NAPI_AUTO_LENGTH'
          NAPI_AUTO_LENGTH,  // JavasScript class name length
          ^
    ../binding.cc:1019:7: error: use of undeclared identifier 'NAPI_AUTO_LENGTH'
          NAPI_AUTO_LENGTH,  // JavasScript class name length
          ^
    ../binding.cc:1123:33: error: cannot initialize a member subobject of type
          'napi_addon_register_func' (aka 'void (*)(napi_env__ *, napi_value__ *, napi_value__
          *, void *)') with an lvalue of type 'napi_value (napi_env, napi_value)' (aka
          'napi_value__ *(napi_env__ *, napi_value__ *)'): different number of parameters
          (4 vs 2)
    NAPI_MODULE(tensorflow_binding, InitBinding)
                                    ^~~~~~~~~~~
    /usr/local/include/node/node_api.h:103:26: note: expanded from macro 'NAPI_MODULE'
      NAPI_MODULE_X(modname, regfunc, NULL, 0)
                             ^~~~~~~
    /usr/local/include/node/node_api.h:92:7: note: expanded from macro 'NAPI_MODULE_X'
          regfunc,                                                        \
          ^~~~~~~
    4 errors generated.
    Error -c
    Error ./tools/build_binding.js
    Error ./tools/test.js
    in_alaska@xxxx propel (grid)⛺  node -v
    v8.4.0
    
    opened by lisza 5
  • Some changes to how progress bars are handled

    Some changes to how progress bars are handled

    • Use byte length, not string length, when computing the number of bytes loaded so far.
    • handle http.get() errors.
    • Reduce the number of type assertions.
    • Explicitly indicate the end of a download by calling downloadProgress(job, null, null).
    opened by piscisaureus 4
  • Adds ./tools/dev_website for fast incremental builds

    Adds ./tools/dev_website for fast incremental builds

    The deps commit includes some hacks on parcel to fix a bug - I will send upstream soon

    https://github.com/propelml/propel_deps/commit/41035369fe03732c3c8eb08cdff617d46dc11caf#diff-5e9e9af54dc82093dc2e5334dfff25c3

    opened by ry 4
  • Allowing to write custom descriptions for each paper

    Allowing to write custom descriptions for each paper

    Hi How about adding the ability to write a custom description for each published paper just like GitHub's gists. It would be great to have keywords and search for keywords too

    website 
    opened by qti3e 4
  • Archive this repo?

    Archive this repo?

    As propelml is recommending to use tfjs in it's README, should this repo be archived? Github documentation on Archiving: https://help.github.com/articles/archiving-repositories/

    opened by trivikr 3
  • Hardcoded invalid dataset location in the npm dist

    Hardcoded invalid dataset location in the npm dist

    It seems like your build script for dist package is messing with paths.

    "[email protected]" from npm contains lots of lines like this one:

    var __dirname = "/Users/rld/src/propel/src";

    Which causes errors when loading datasets.

    opened by thefill 3
  • notebook breaks on object literal input

    notebook breaks on object literal input

    If you put { a: "w", b: "hello", c: 123} into the inspector it gives an error: SyntaxError: Unexpected token (4:3)

    screen shot 2018-04-11 at 9 08 48 am

    There's some debate as to whether this is actually a bug, since it's technically a block scope with labels... However the Node REPL and Chrome Inspector parse it in the way one would expect..

    opened by ry 0
  • change API for dataset

    change API for dataset

    Currently the dataset is specified as a string:

    pr.dataset("cifar10/train")
    pr.dataset("iris")
    

    It would be better to use actual functions for each. example:

    pr.dataset.cifar10("train")
    pr.dataset.iris()
    

    This allows for type checking on the components of the datasets - that is cifar10 has { images, labels } and iris has { features, labels } - thus the docs will better reflect the information people need.

    splitName should default to "train"

    opened by ry 0
  • cifar10 and mnist should be sharded

    cifar10 and mnist should be sharded

    cifar10/train is 150mb and mnist/train is 50mb - accessing a single element from either of these will trigger a download of the whole set.

    Ideally we can split these datasets into ~ 2mb chunks so they can be downloaded progressively. If only one batch is inspected (like for debugging) only 2mb will be used.

    I've already split cifar10/train images into these files and uploaded them (using this script)

    http://ar.propelml.org/cifar10_train_images_00.npy
    http://ar.propelml.org/cifar10_train_images_01.npy
    ...
    http://ar.propelml.org/cifar10_train_images_49.npy
    
    opened by ry 0
[UNMAINTAINED] Simple feed-forward neural network in JavaScript

This project has reached the end of its development as a simple neural network library. Feel free to browse the code, but please use other JavaScript

Heather 8k Dec 26, 2022
A neural network library built in JavaScript

A flexible neural network library for Node.js and the browser. Check out a live demo of a movie recommendation engine built with Mind. Features Vector

Steven Miller 1.5k Dec 31, 2022
Pure Javascript OCR for more than 100 Languages 📖🎉🖥

Version 2 is now available and under development in the master branch, read a story about v2: Why I refactor tesseract.js v2? Check the support/1.x br

Project Naptha 29.2k Dec 31, 2022
WebGL-accelerated ML // linear algebra // automatic differentiation for JavaScript.

This repository has been archived in favor of tensorflow/tfjs. This repo will remain around for some time to keep history but all future PRs should be

null 8.5k Dec 31, 2022
A JavaScript deep learning and reinforcement learning library.

neurojs is a JavaScript framework for deep learning in the browser. It mainly focuses on reinforcement learning, but can be used for any neural networ

Jan 4.4k Jan 4, 2023
Machine learning tools in JavaScript

ml.js - Machine learning tools in JavaScript Introduction This library is a compilation of the tools developed in the mljs organization. It is mainly

ml.js 2.3k Jan 1, 2023
Deep Neural Network Sandbox for JavaScript.

Deep Neural Network Sandbox for Javascript Train a neural network with your data & save it's trained state! Demo • Installation • Getting started • Do

Matias Vazquez-Levi 420 Jan 4, 2023
A WebGL accelerated JavaScript library for training and deploying ML models.

TensorFlow.js TensorFlow.js is an open-source hardware-accelerated JavaScript library for training and deploying machine learning models. ⚠️ We recent

null 16.9k Jan 4, 2023
JavaScript API for face detection and face recognition in the browser and nodejs with tensorflow.js

face-api.js JavaScript face recognition API for the browser and nodejs implemented on top of tensorflow.js core (tensorflow/tfjs-core) Click me for Li

Vincent Mühler 14.6k Jan 2, 2023
Call Python packages in JavaScript.

Introduction to Boa Boa is the Python Bridge Layer in Pipcook, it lets you call Python functions seamlessly in Node.js, it delivers any Python module

imgcook 64 Jan 5, 2023
Linear Regression library in pure Javascript

Lyric Linear Regression library in pure Javascript Lyric can help you analyze any set of x,y series data by building a model that can be used to: Crea

Flurry, Inc. 43 Dec 22, 2020
JavaScript Machine Learning Toolkit

The JavaScript Machine Learning Toolkit, or JSMLT, is an open source JavaScript library for education in machine learning.

JSMLT 25 Nov 23, 2022
K-nearest neighbors algorithm for supervised learning implemented in javascript

kNear Install npm install knear --save About kNear is a javascript implementation of the k-nearest neighbors algorithm. It is a supervised machine lea

Nathan Epstein 45 Mar 7, 2022
Latent Dirichlet allocation (LDA) topic modeling in javascript for node.js.

LDA Latent Dirichlet allocation (LDA) topic modeling in javascript for node.js. LDA is a machine learning algorithm that extracts topics and their rel

Kory Becker 279 Nov 4, 2022
Simple Javascript implementation of the k-means algorithm, for node.js and the browser

#kMeans.js Simple Javascript implementation of the k-means algorithm, for node.js and the browser ##Installation npm install kmeans-js ##Example (JS)

Emil Bay 44 Aug 19, 2022
DN2A - Digital Neural Networks Architecture in JavaScript

DN2A (JavaScript) Digital Neural Networks Architecture About DN2A is a set of highly decoupled JavaScript modules for Neural Networks and Artificial I

Antonio De Luca 464 Jan 1, 2023
Clustering algorithms implemented in Javascript for Node.js and the browser

Clustering.js ####Clustering algorithms implemented in Javascript for Node.js and the browser Examples License Copyright (c) 2013 Emil Bay github@tixz

Emil Bay 29 Aug 19, 2022
:robot: Natural language processing with JavaScript

classifier.js ?? An library for natural language processing with JavaScript Table of Contents Instalation Example of use Auto detection of numeric str

Nathan Firmo 90 Dec 12, 2022
AREX: It is a “Differential Testing” and “Record and Replay Testing” Tool.

AREX: It is a “Differential Testing” and “Record and Replay Testing” Tool. Test restful API by record, replay and stub request/response. Differential

ArexTest 15 Nov 1, 2022