Experiment - Broadcasting
Problem:You want to add a 1D tensor to each row of a 2D tensor using PyTorch. Currently, you try to add them directly but get a size mismatch error.
Current Metrics:Error: RuntimeError: The size of tensor a (3) must match the size of tensor b (4) at non-singleton dimension 1
Issue:The tensors have incompatible shapes for addition. You need to use broadcasting to add the smaller tensor to each row of the larger tensor.