Based on the error message it seems the returned samples of your Dataset do not have the same shape, so that the default collate_fn cannot stack them to a single tensor.
If you are working with variable shapes, you could write a custom collate_fn and return e.g. a list or alternatively you could check, why the samples have different shapes and make sure the shapes are equal.