[BUG] [DOCS] VitTransformerBlock examples have einops error
evelynmitchell opened this issue · comments
evelynmitchell commented
---------------------------------------------------------------------------
EinopsError Traceback (most recent call last)
[/usr/local/lib/python3.10/dist-packages/einops/einops.py](https://localhost:8080/#) in reduce(tensor, pattern, reduction, **axes_lengths)
521 shape = backend.shape(tensor)
--> 522 recipe = _prepare_transformation_recipe(pattern, reduction, axes_names=tuple(axes_lengths), ndim=len(shape))
523 return _apply_recipe(
10 frames
EinopsError: Wrong shape: expected 4 dims. Received 3-dim tensor.
During handling of the above exception, another exception occurred:
EinopsError Traceback (most recent call last)
[/usr/local/lib/python3.10/dist-packages/einops/einops.py](https://localhost:8080/#) in reduce(tensor, pattern, reduction, **axes_lengths)
531 message += "\n Input is list. "
532 message += "Additional info: {}.".format(axes_lengths)
--> 533 raise EinopsError(message + "\n {}".format(e))
534
535
EinopsError: Error while processing rearrange-reduction pattern "b p n (h d) -> b h p n d".
Input tensor shape: torch.Size([5, 4, 512]). Additional info: {'h': 8}.
Wrong shape: expected 4 dims. Received 3-dim tensor.
I'm going to try to figure out what the correct input shape is.
Upvote & Fund
- We're using Polar.sh so you can upvote and help fund this issue.
- We receive the funding once the issue is completed & confirmed by you.
- Thank you in advance for helping prioritize & fund our backlog.
Kye Gomez commented
It says it expects 4 dimensions
evelynmitchell commented
Docs PR incoming to fix