Skip to content

Commit

Permalink
🚨 test(integration): activate DecorrelateRGB in test (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-francoisreboud authored Dec 5, 2022
1 parent 7f8bdad commit 3d59e5c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
3 changes: 2 additions & 1 deletion Docs/Contributing/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ All notable changes to this project will be documented in this file.

## [unreleased]

🚨 **integration**: activate DecorrelateRGB in test ([#29](https://github.com/owkin/MAKit/pull/29))\
🚨 **integration**: test IDFT and complex numbers ([#28](https://github.com/owkin/MAKit/pull/28))\
🚨 **layer_2d**: add tests for non dirty status ([#27](https://github.com/owkin/MAKit/pull/27))\
🪜 **layer_2d**: add tests for non dirty status ([#27](https://github.com/owkin/MAKit/pull/27))\
🔨 **tests**: factorize transform tests ([#26](https://github.com/owkin/MAKit/pull/26))\
🪜 **layer_2d**: FTFrequences2D & Multiply2D ([#25](https://github.com/owkin/MAKit/pull/25))\
🪜 **layer_2d**: LinearScale2D ([#24](https://github.com/owkin/MAKit/pull/24))\
Expand Down
7 changes: 2 additions & 5 deletions Tests/MATorchTests/Base/Model.swift
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ class ModelTest3
/// Principle features:
/// - 2D Frequences & scale
/// - IRDFT
/// - (Decorrelate color)
/// - Decorrelate color
///
/// - Parameter size: The size of the input data.
/// - Returns: The built model.
Expand Down Expand Up @@ -269,18 +269,15 @@ class ModelTest3
params: params
)

/*
Introduces float rounding approximation issues!
layer = DecorrelateRGB(
layerPrev: layer,
correlation: [
0.26, 0.26, 0.27,
0.26, 0.27, 0.27,
0.09, 0.00, -0.09,
0.02, -0.05, 0.03
].map { $0 / 0.4619524 },
params: params
)
*/

layer = Activation2D(
layerPrev: layer,
Expand Down
4 changes: 2 additions & 2 deletions Tests/MATorchTests/Base/python_lib/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ class ModelTest3(torch.nn.Module):
Principle features:
- 2D Frequences & scale
- IRFFT
(- Decorrelate color)
- Decorrelate color
"""

def __init__(self, size):
Expand All @@ -254,7 +254,7 @@ def forward(self, x: torch.Tensor) -> torch.Tensor:
"""
x = x * self.scale
x = _irfft_image(x)
# x = _linear_decorrelate_color(x)
x = _linear_decorrelate_color(x)
x = torch.nn.Sigmoid()(x)
x = -1 + 2 * x
x = x[None]
Expand Down

0 comments on commit 3d59e5c

Please # to comment.