Unverified Commit 1218e439 authored by Vladimir Iashin's avatar Vladimir Iashin Committed by GitHub
Browse files

Removed unnecessary `self.projection` call in `VivitTubeletEmbeddings` (#31632)

removes unnecessary second projection call
parent 2daf2c3e
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment