Lesson 10.
Project five.
Intelligent Media, a station with 280 for theory and data collection.
Now for this lesson learned how to use your terminal and TensorFlow for microcontrollers to make a smart
media station that can predict the weather and precipitation for the next 24 hours.
Based on the data from local sensors like the Beam Me 280 in this lesson, you will learn how to apply
model optimization techniques, which will allow you to run a medium sized convolutional neural network,
as well as a sleek GeoEye and Wi-Fi, all at the same time for the days and months.
Now this is the end result.
You can see the current temperature, humidity and atmospheric pressure on the screen, as well as the
city name.
The predicted weather type and the predicted precipitation chance at the bottom of the screen.
There is actually a log output field here, which you can use to show extreme weather information or
other relevant information.
There are a lot of things you can do to make it even better, actually.
For example, you can put news and tweets on the screen using deep sleep mode to save energy and make
it battery powered.
And so on.
It is the same thing we have done many times before, but this time the time period for weather prediction
is a lot longer than it was in the past.
But we measure every hour we will use 24 hours of data to make predictions about how things will go
with.
The same model will also predict what weather will be like for the next 24 hours.
The Chorus Function API and the multi output model will help us with this, so we will use them.
Now this is going to be a very interesting topic, so make sure to listen very well in a multi output
model.
There will be a standard which will be the same for both outputs.
This time will branch out to two different outputs.
The main reason to use a multi output model instead of two separate model is that the data and learned
feature is used to predict weather type and precipitation charts are very similar.
If you're making this project on the windows, first thing you'll need to do is to download nightly
version of the Arduino I.D. Since current stable version, one point eighteen point three will not compile
sketches with a lot of leverage dependencies.
The issue is that Linka command during compilation exceeds maximum length on windows.
Second thing is that you need to make sure you have one point eight point two version of C SGMD board
definitions adrenal I.D. Then finally, since we're using a convolutional neural network and build it
with chorus API, it contains an operation that supported by current stable version of TensorFlow Micro,
resulting TensorFlow issues on GitHub.
One found that there is a pull request for adding this up.
Expand underscore DMC two list of available apps, but it was not merged into Master at the time of
making this video.
You can get lawned the TensorFlow repository, switch to PR branch and compile are doing a library by
executing this code.
Alternatively, you can download already compiled library from this project GitHub repository and place
it into your Arduino Sketchiest Libraries folder.
Just make sure you only have one TensorFlow Lite library at the time.
Now, to kick off the practice mode, it all begins with the data off the course.
For this tutorial, we will use a readily available weather data set from Kaggle Historical Hourly Weather
Data of 2012 to 2017.
The seat Edu headquarters are located in Shenzhen, which is a city in southern China, and that city
is absent from the data set.
So we picked a city that is located on the similar latitude and also has a subtropical climate, which
is Miami.
Now you'll need to pick a city that at least has a similar climate to where you live.
If you train a model on data from Miami and then use it in Chicago in the winter.
It won't be able to predict what will happen in the course materials.
You can find a Jupyter notebook that you can use to process and train models.
Let's try to open it now.
Now, because Google Lab already has all the software you need.
The easiest way to run this notebook is to upload it in Google CoLab.
Alternatively, you can execute the book locally and to do that, first install all the required dependencies
in the virtual environment by running PIP, Install Slash our requirements that tax with email virtual
environment you have created before activated, then run Jupyter Notebook Command in the same environment,
which will open notebook server in your default browser.
Jupiter notebooks are a great way to explore and present data since they allow having both text and
executable code in the same environment.
The general workflow is somewhat explained in the notebook text sections, so make sure to experiment
with different plan time window in the notebook to see how it affects model accuracy.