mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
Removed unnecessary self.projection
call in VivitTubeletEmbeddings
(#31632)
removes unnecessary second projection call
This commit is contained in:
parent
2daf2c3eaa
commit
1218e439b5
@ -76,7 +76,8 @@ class VivitTubeletEmbeddings(nn.Module):
|
||||
|
||||
x = self.projection(pixel_values)
|
||||
# out_batch_size, out_num_channels, out_num_frames, out_height, out_width = x.shape
|
||||
x = self.projection(pixel_values).flatten(2).transpose(1, 2)
|
||||
# flattens time and space dimensions, transposes to (out_batch_size, flat_tokens, out_num_channels)
|
||||
x = x.flatten(2).transpose(1, 2)
|
||||
return x
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user