Skip to content

Commit

Permalink
test(compute_layer_sv): add unit test with bias and activation
Browse files Browse the repository at this point in the history
SpectralConv2D SV computation must remove bias and activation before
computing the equivalent matrix. A unit test of a SpectralConv2D with
bias and ReLU is added.
  • Loading branch information
cofri committed Feb 29, 2024
1 parent 4c1d441 commit d2c6542
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/test_compute_layer_sv.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,23 @@ def test_spectralconv2d(self):
test_SVmin=False,
callbacks=[],
),
dict( # SpectralConv2D with bias and activation
layer_type=SpectralConv2D,
layer_params={
"filters": 2,
"kernel_size": (3, 3),
"activation": "relu",
},
batch_size=100,
steps_per_epoch=125,
epochs=5,
input_shape=(5, 5, 1),
k_lip_data=1.0,
k_lip_model=1.0,
k_lip_tolerance_factor=1.02,
test_SVmin=False,
callbacks=[],
),
dict(
layer_type=SpectralConv2D,
layer_params={
Expand Down

0 comments on commit d2c6542

Please sign in to comment.