-
-
Notifications
You must be signed in to change notification settings - Fork 0
Creating Liquid Carrot
Part 1: Technology - Back to Top
Supporting Browser & Node.js - Back to Top
Articles
- Writing JavaScript Modules for Both Browser and Node.js
- Publishing packages that can be used in browsers and Node
- JavaScript module to run both in a browser and in Node.js
- Exports & Dynamic Dependencies for Node and the Browser
Examples
- Grunt, Browserify, Jasmine, Node Example - Dynamically Importing Modules
- Highland.js - Streaming in Node.js & The Browser - Dynamically Exporting Modules
Tools
Testing Browser & Node.js - Back to Top
TDD is best when implemented early - it saves lives, keeps users happy and secure, cures early-onset balding, reduces team-wide WTF's/minute, and makes your project look cool (i.e.
build | passing
tags).
Articles
- How to Write a Library for Node.js and Browser with Mocha Unit Tests
- UI Testing with Puppeteer and Mocha — Part 1 (Getting Started)
- Running Mocha Tests as Native ES6 Modules in a Browser
- Using Mocha with Puppeteer
- Inject jQuery into Puppeteer Page
- How to separate mocha tests in multiple files
Tools
- https://www.npmjs.com/package/mocha
- https://www.npmjs.com/package/chai
- https://www.npmjs.com/package/puppeteer
- https://www.npmjs.com/package/nodeunit
Threading (Node) - Back to Top
Articles
- Node.js
cluster
Documentation - Node.js multithreading: What are Worker Threads and why do they matter?
- Multi threading and multiple process in Node.js
- Is it possible to achieve multithreading in nodejs?
- What are the drawbacks of making a multi-threaded JavaScript runtime implementation?
- Optimising* Node.js for Speed: Part 3
Tools
Threading (Browser) - Back to Top
Articles
- Run web worker with a function, rather than external file
- MDN
Worker
Documentation - MDN
navigator.hardwareConcurrency
Documentation - Get number of CPU cores in JavaScript?
- The Basics of Web Workers
- Naming a Web Worker for Future Reference
Examples
Tools
Streaming (Node) - Back to Top
Tools
Streaming (Browser) - Back to Top
Tools
Documentation (Markdown) - Back to Top
Tools
Documentation (HTML) - Back to Top
Articles
Tools
Part 2: Architecture - Back to Top
Serialization vs Parallelization vs Streaming vs Threading Table
Neural networks consist, primarily, of A LOT of neurons running dot product operations on data or results of "previous" neurons in the network and the squashing said dot product somehow - e.g. sigmoid function, ReLU function, etc. To run neural networks efficiently, we developers try to run operations in parallel using GPUs whenever possible. Here's a table outlining when the different dot
and squash
operations can be run in parallel (w/ GPUs).
Abstraction | Function | Serial | Parallel |
---|---|---|---|
Neuron | dot |
true |
true |
Neuron | squash |
true |
false |
Group | dot |
true |
true |
Group | squash |
true |
true |
Network | dot |
true |
true |
Network | squash |
true |
true |
Streaming vs ELT
Much like CPU vs GPU computing streaming and threading are complementary techniques that can further accelerate the speed at which a tool "runs". When using neural networks it's important that we squeeze out every computational resource that we can. Streaming allows us to consume less data and limit the amount of data that we consume per unit of time; threading allows us to process the data faster. Below we have a list of when we can use each technique.
Abstraction | Streaming | Threading |
---|---|---|
Neuron | false |
false |
Group | false |
true |
Network | true |
true |
Connections - Back to Top
Connections help track relationships between Neurons or Groups and move information among them.
Neurons - Back to Top
Neurons are the basic building block of neural networks - and cognition, in general.
Group - Back to Top
Groups are an abstraction to handle a collection of Neurons or other_Group_.
Network - Back to Top
Networks serve as the first unit of cognition and a collection of neurons and groups tied together.
Team - Back to Top
Teams serve as a collection of networks working together to solve a group of problems.
Population - Back to Top
Population is an abstraction to handle a collection of Networks or Teams.
Environment - Back to Top
Environment is standardized API that Populations, Teams, and Networks can consume to train or learn.
Data - Back to Top
Data is a utility API for Environments, Populations, Teams, and Networks to train or learn from data.
Bot - Back to Top
Bot is an abstraction of Data, Environment, Population, Teams, and Networks that focuses on non-technical ease-of-use.