Created
January 10, 2019 10:58
-
-
Save barrymcgee/9fd56968572935a6bcb32e7d2e369ae8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let net = new brain.NeuralNetwork(); | |
net.train([{ | |
Input: { r: 0.03, g: 0.7, b: 0.5 }, | |
Output: { black: 1 } | |
},{ | |
Input: { r: 0.16, g: 0.09, b: 0.2 }, | |
Output: { black: 1 } | |
},{ | |
Input: { r: 0.5, b: 0.5 }, | |
Output: { black: 1 } | |
}]); | |
let output = net.run({ r: 1, g: 0.4, b: 0 }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// [{input: [confidence, sharpness, brightness, contrast, noise, hasFace, isCeleb, etc], output: [RATING]}, | |
{ | |
Input: { c: 0.12, s: 0.01, b: 0.1, c: 0.1, n: 0.876, hasFace: 0, isCeleb: 0 }, | |
Output: { rating: 1 } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment