Tensors must have same number of dimensions : got 5 and 3
See original GitHub issueHello @lucidrains @stevenwalton
I have been trying to implement the standard ViT in 3d space and I have worked on some part of code ViT changed the Rearrange in patch embedding to as follows
Rearrange('b e (h p1) (w p2) (d p3) -> b (e p1 p2 p3) h w d',p1=patch_size,p2=patch_size,p3=patch_size)
and this patch embbeddings are passed to map with cls_tokens cls_tokens = repeat(self.cls_token, '() n e -> b n e', b=b)
which throws an error due to dimensionality mismatch so how can i change the shape of cls_tokens to match the dimensionality of the patch_embeddings.
can you help me for getting solution to this problem Thanks & Regards Satwik Sunnam
Issue Analytics
- State:
- Created a year ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
pytorch DataLoader: `Tensors must have same number of ...
I am using 365 timesteps of X1 & X2 as features used to predict y . The dimensions of my training array is:...
Read more >Tensors must have same number of dimensions: got 2 and 1
I am studying AI and now I am trying to understand and update a code which was made for older version of Pytorch....
Read more >Tabular data: Tensors must have same number of dimensions
Hi there, I'm trying to do a binary classification but have a problem, Data: It's a tabular dataset, train: 90000 x 2, validation:...
Read more >abhibongale/know-tensors-with-pytorch - Jovian
Non-empty tensors provided must have the same shape, except in the cat dimension. dim (int, optional) – the dimension over which the tensors...
Read more >Torch Tensor
A Tensor is a potentially multi-dimensional matrix. The number of dimensions is unlimited that can be created using LongStorage with more dimensions. Example:....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@lucidrains I have completed the vit-3d model and it’s working good and i can add my vit-3d project to your GitHub , if you’re willing me to do so.
Thanks @lucidrains @stevenwalton