Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
james77777778 committed Jan 29, 2024
1 parent b7f2848 commit 203b2a0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
17 changes: 17 additions & 0 deletions kimm/layers/rep_conv2d_test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import pytest
from absl.testing import parameterized
from keras import backend
from keras import random
from keras.src import testing

Expand Down Expand Up @@ -63,6 +64,14 @@ def test_rep_conv2d_basic(
num_trainable_weights,
num_non_trainable_weights,
):
if (
backend.backend() == "tensorflow"
and data_format == "channels_first"
):
self.skipTest(
"Conv2D in tensorflow backend with 'channels_first' is limited "
"to be supported"
)
self.run_layer_test(
RepConv2D,
init_kwargs={
Expand Down Expand Up @@ -91,6 +100,14 @@ def test_rep_conv2d_get_reparameterized_weights(
num_trainable_weights,
num_non_trainable_weights,
):
if (
backend.backend() == "tensorflow"
and data_format == "channels_first"
):
self.skipTest(
"Conv2D in tensorflow backend with 'channels_first' is limited "
"to be supported"
)
layer = RepConv2D(
filters=filters,
kernel_size=kernel_size,
Expand Down
1 change: 1 addition & 0 deletions kimm/models/models_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@
]


@pytest.mark.requires_trainable_backend # numpy is too slow to test
class ModelTest(testing.TestCase, parameterized.TestCase):
@classmethod
def setUpClass(cls):
Expand Down

0 comments on commit 203b2a0

Please sign in to comment.