Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
innat committed Mar 22, 2024
1 parent a84cf07 commit 49bd830
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/test_layers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from base import TestCase
import keras
from keras import ops

from videoswin.layers import (
Expand All @@ -13,9 +14,9 @@ def test_patch_embedding_compute_output_shape(self):
patch_embedding_model = VideoSwinPatchingAndEmbedding(
patch_size=(2, 4, 4), embed_dim=96, norm_layer=None
)
input_shape = (None, 16, 32, 32, 3)
output_shape = patch_embedding_model.compute_output_shape(input_shape)
expected_output_shape = (None, 8, 8, 8, 96)
input_array = keras.random.normal(shape=(1, 16, 32, 32, 3))
output_shape = patch_embedding_model(input_array).shape
expected_output_shape = (1, 8, 8, 8, 96)
self.assertEqual(output_shape, expected_output_shape)

def test_patch_embedding_get_config(self):
Expand Down

0 comments on commit 49bd830

Please sign in to comment.