Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃毃 test(integration): activate DecorrelateRGB in test #29

Merged
merged 1 commit into from
Dec 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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