ValueError: operands could not be broadcast together with shapes (2,7) (2,)

Hi @RyeToast

The problem most probably lies in your Exercise 01 -line_to_tensor(). This error says that you tried to slice a scalar (for example, 4[:3], which is not possible).

Exercise 01 is a very simple exercise which you should’ve implemented using two lines of code (that are identical to the code couple of cells above). This function should’ve returned ids variable which you could slice (for example, ids[:3], should be possible) because ids should’ve been a tensor.

Cheers

1 Like