Skip to content

Commit

Permalink
add support arbitrary input shape
Browse files Browse the repository at this point in the history
  • Loading branch information
innat committed Mar 22, 2024
1 parent 4bf9d9b commit e5f443f
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions videoswin/layers/patch_embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,6 @@ def call(self, x):

return x

def compute_output_shape(self, input_shape):
spatial_dims = [
(dim - self.patch_size[i]) // self.patch_size[i] + 1
for i, dim in enumerate(input_shape[1:-1])
]
output_shape = (input_shape[0],) + tuple(spatial_dims) + (self.embed_dim,)
return output_shape

def get_config(self):
config = super().get_config()
config.update(
Expand Down

0 comments on commit e5f443f

Please sign in to comment.