UMBC CMSC 471 02 Spring 2021 |
• home • about • schedule • hw • exams • notes • code • colab • github • resources • news • piazza • discord • webex • |
Homework EX2: TensorFlow MLP for the Zoo Datasetout Tue 5/7, due Wed 5/21Assignment repository invitationOverviewThis is a simple extra credit homework that asks you to develop a jupyter notebook that implements simple multi-level preceptron in TensorFlow to work with the zoo_big dataset from HW5. It will give you some experience in preparing data for a neural network and using colab and TensorFlow. There are many issues involved:
There are also a few simple questions to answer in the repository file questions.md. Colab or your own computer?You can do this assignment using your own computer or colab. You can also try both! To do this on your own computer, you will need a fairly recent version of Python (3.6 or better). You will have to use pip to install jupyter and all of the packages that you will find in the two notebooks, ex2.ipynb and ex2_wine_example.ipynb. Running these will not require much computation so you don't need to turn to colab for access to its GPUs. Once you have this all set go to your ex2 repository directory and invoke jupyter notebook. You can then use it to load ex2_wine_example.ipynb and you are off and running. Be sure to save the file if you are making changes that you want to keep. To run this on colab, we suggest the following steps. But you will not need to pip install anything.
A worked example to tryStart by opening the notebook ex2_wine_example.ipynb. This example uses data from the UCI machine learning repository. The data has 11 attributes and a quality score for many white wine samples. You should walk through the notebook, reading the markup cells and running the code cells to try to understand it. feel free to experiment by changing cells, adding new ones, etc. To completely restart the notebook, you can restart the kernel and clear the output. If you've edited the notebook, you can always just close its window and reload the original. The ex2.ipnb stubWhen you are comfortable using the ex2_wine_example notebook and feel that you understand how it uses TensorFlow, you can move on to filling out the stub notebook ex2.ipnb. This has the cell you will need, but some are only partially filled in. The data in zoo_big.csv needs to be reformatted to use in a neural network and save in a file named myzoo.csv. The stub ex2.ipynb will load this file. One issue is that all of the cell values need to be numeric. Another is that you should delete the first column, since it is of no use as training data. You might do some of these changes in a text editor. Others are easier to do in a spreadsheet system, like excel or good sheets. Save the modified data file as myzoo.csv. you will have to fill in the partially completed code blocks in the notebook. You can use the somewhat more complicated wine example as a guide. Final stepsWhen you have completed ex2.ipynb, be sure to save a copy in your repo. You can then answer the questions in questions.md. commit and push the results and you are done.
|
BIT.LY/471s21 • CMSC 471 02 Spring 2021 • CSEE • UMBC |