In the last cell in that notebook, you have the following line:
   inputs, labels = data

since data is a dictionary, that assignment will only assigns the keys. I made an example dictionary d with two elements:
>>> d = {'a':1, 'b':2}
>>> x, y = d
>>> x, y
('a', 'b')

Yet, another problem is in your dataset class, where in __getitem__ you defined sample as a dictionary, and then pass a dictionary to self.transform() function. The transformation functions only accept PIL Image as input not dictionary.