Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const model = tf.sequential();
- const hidden = tf.layers.dense({
- units: 3,
- inputShape: [3] //Each input has 3 values r, g, and b
- });
- const output = tf.layers.dense({
- units: 1 //only one output (the color that corresponds to the rgb values
- });
- model.add(hidden);
- model.add(output);
- model.compile({
- activation: 'sigmoid',
- loss: "meanSquaredError",
- optimizer: tf.train.sgd(0.005)
- });
Add Comment
Please, Sign In to add comment