$8.99
Note: The assignment will be autograded. It is important that you do not use additional libraries, or change the provided functions input and output.
Part 1: Setup
• Remote connect to a EWS machine.
ssh (netid)@remlnx.ews.illinois.edu
• Load python module, this will also load pip and virtualenv
module load python/3.4.3
• Create a virtualenv “cs446sp 2018”.
virtualenv --system-site-packages ~/cs446sp_2018
• Activate the virtualenv
source ~/cs446sp_2018/bin/activate
• Update pip
pip install --upgrade pip
• Checkout and change directory to the course svn repository
svn co https://subversion.ews.illinois.edu/svn/sp18-cs446/(netid)
cd (netid)
• Copy mp1 into your svn directory, and change directory to mp1.
svn cp https://subversion.ews.illinois.edu/svn/sp18-cs446/_shared/mp1 . cd mp1
• Install the requirements through pip.
pip install -r requirements.txt
1
2
Part 2: Exercise
The purpose of this exercise is to introduce you to basic components of Tensorflow, a Python
machine learning framework which will be used for the assignments this semester. Specifi- cally, you will need to implement code that creates a few basic computation graphs and then executes them. Before beginning, read through Tensorflow’s “Getting Started” tutorial 1
The following methods must be implemented (more specific details can be found in the corresponding source files):
• In run computation.py , the method run computation, which takes a computation graph node as input, initializes all variables, runs the node, and returns the result.
• In toy functions.py , the methods toy fn 1, toy fn 2, and toy fn 3, which all build computation graphs for different functions.
Part 3: Writing Tests
In test.py we have provided basic test-cases. Feel free to write more. To test the code,
run the following (which runs test.py ):
nose2
Part 4: Submit
Submitting the code is equivalent to committing the code. This can be done with the follow
command:
svn commit -m "Some meaningful comment here."
Lastly, double check on your browser that you can see your code at
https://subversion.ews.illinois.edu/svn/sp18-cs446/(netid)/mp1/