Simple Flower Classification by ANN


  • Introduction to problem
  • Introduction to data-set
  • Training, Testing and Visualization


  1. Jetson Nano
  2. Power adapter for jetson 5v-2A
  3. Monitor, Keyboard and Mouse

Let’s begin!

The installation and setup of the Jetson Board can be found HERE

Problem Statement

Length Width Type
3 1.5 Red
2 1 Blue
4 1.5 Red
3 1 Blue
3.5 .5 Red
2 .5 Blue
5.5 1 Red
1 1 Blue
4.5 1 ??


Let us consider there is 2 colors of flower Red and Blue for which the height and width is given in the table. The objective is to create a ANN program capable of predicting the class of unknown color of flower based on its height and width.

There are two inputs i.e. height and Width and a single output for determining the color of flower

nn(length, width) = sigmoid(w1 * length + w2 * width + b)

Here, sigmoid is used to squash the input between 0 and 1. Since there are only 2 outputs anything below 0.5 can be considered Red and above

Installing the necessary libraries

sudo apt-get install nodejs

sudo apt-get install npm

To check you installation you can type

nodejs -v

Hello World with tensorflow

gedit flower.js

Enter the following code to verify

To run the code save it, execute the following command

node flower.js
SEE ALL Add a note
Add your Comment

We would love to see what you build out of these learnings!

Click here to submit your projects, share it with the world and stand a chance to be rewarded.


Knowledge and Content by Li2 Technologies | © 2021 NASSCOM Foundation | All rights reserved