B231: Robot Learning (UROB)
Undergraduate course, CTU FEE, Department of Cybernetics, 2023
Course description
The course covers deep learning methods for well-known robotic problems, such as semantic segmentation and reactive robot motion control. It aims at lasting, general knowledge rather than a catalog of deep learning architectures. Students should already know mathematics (gradient, Jacobian, Hessian, gradient descent, Taylor polynomial) and machine learning (Bayesian risk minimization, linear classifier).
The labs have two parts. In the first, students solve basic deep learning problems from scratch, including reimplementing autograd backpropagation. In the second, they build on existing templates to solve complex problems, including reinforcement learning (RL), transformers, and generative networks.
All course information is on the UROB Courseware page.
HW 1: Autograd
See the HW 1 Courseware page.
In this assignment, you implement your own autograd library, similar to the one shown in the lab. The lab covered autograd for scalar values; your solution must also work with vectors and tensors.
The assignment has two parts: first, you complete the provided autograd library; then you use it to solve a direct kinematic task (DKT).
Download the assignment files (hw01.zip).
Task 1 (6 pts)
Complete the engine.py file. Fill in the functions marked with ellipses (…) so they compute the forward and backward passes correctly.
Use the numpy library (see the NumPy documentation). Don’t use any library with built-in autograd, such as PyTorch or TensorFlow.
Most functions need only a few lines. If you’re unsure how to approach the more complex ones, consult the lab materials before contacting the tutors.
Note that the variable other in the __pow__ function is an int or float, so you can’t add it to the parent set of the output. Backpropagation works only for Tensor objects.
You need the reshape_gradient function only in __add__ and __mul__, the two functions that involve broadcasting; it calculates the gradient for broadcasted values.
Task 2 (4 pts)
Complete the computational parts of the DKT. The robot then uses your autograd library to adjust joint angles and arm lengths to reach the target location.
The hw1.ipynb notebook has all the necessary information; implement the computational parts in assignments.py.
Submission and evaluation
You can earn up to 10 points. BRUTE, the faculty’s automatic evaluation system, grades the assignment, and the tutors may re-evaluate any submission later.
You lose one point for every 24 hours past the deadline, up to 9 points.
Good luck! Don’t forget to experiment with the task, and if you have any questions or concerns, please contact me.