Sale!

# ECE 449 — Homework 0

\$30.00

Category:
Rate this product

CS 446 / ECE 449 — Homework 0
Version 1
Instructions.
• Homework is due Wednesday, September 1, at noon CST. Homework 0 does not count into your
• Everyone must submit individually at gradescope under hw0 and hw0code.
• This is a calibration homework; please work alone and don’t hunt for solutions. If Homework 0 is
difficult for you, extensive efforts are expected to complete this course.
is re-run each time you submit.
Questions.
2. Fill out the template squares.py (found on Campuswire-Files) with two functions.
(a) Given an integer k, return (1, 2
2
, . . . , k2
) as a numpy array.
Library routines: it suffices to use numpy.arange and arithmetic operations.
(b) Given an integer k, return (1, 2
2
, . . . , k2
) as a pytorch array.
Library routines: it suffices to use torch.arange and arithmetic operations.
Submit your solution on gradescope under hw0code. Remember that you can submit multiple times!
3. Plot the function f(k) = k
2
, e.g., using matplotlib (do not submit figures and do not submit this
part of code. We just want you to get familiar with plotting).
Note. This coding part may seem silly, but please take it seriously, and use this time to get familiar with