Skip to content

Commit

Permalink
馃悰 fix: update correlation matrix coeffs (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-francoisreboud committed Dec 11, 2022
1 parent 5d0fa78 commit 8d16ce1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions Docs/Contributing/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file.

## [unreleased]

馃悰 **fix:** update correlation matrix coeffs ([#37](https://github.com/owkin/MAKit/pull/37))\
馃獪 **layer_2d:** ResizeBilinearCrop ([#36](https://github.com/owkin/MAKit/pull/36))\
馃殌 **perf:** enhance backwardGPU for ResizeBilinear ([#35](https://github.com/owkin/MAKit/pull/35))\
馃獪 **layer_2d:** Rotate2D ([#34](https://github.com/owkin/MAKit/pull/34))\
Expand Down
6 changes: 3 additions & 3 deletions Tests/MATorchTests/Base/Model.swift
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,9 @@ class ModelTest3
layer = DecorrelateRGB(
layerPrev: layer,
correlation: [
0.26, 0.27, 0.27,
0.09, 0.00, -0.09,
0.02, -0.05, 0.03
0.26, 0.09, 0.02,
0.27, 0.00, -0.05,
0.27, -0.09, 0.03
].map { $0 / 0.4619524 },
params: params
)
Expand Down
2 changes: 1 addition & 1 deletion Tests/MATorchTests/Base/python_lib/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def _linear_decorrelate_color(x):
color_correlation_normalized = \
color_correlation_svd_sqrt / max_norm_svd_sqrt
color_correlation_normalized = torch.Tensor(
color_correlation_normalized.astype("float32")
color_correlation_normalized.T.astype("float32")
)
x_flat = torch.matmul(x_flat, color_correlation_normalized)
x = torch.reshape(x_flat, x.shape)
Expand Down

0 comments on commit 8d16ce1

Please sign in to comment.