Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
7b2afe4d
Commit
7b2afe4d
authored
Jul 29, 2017
by
Theo Steininger
Browse files
Fixed reshaping bugs in DiagonalOperator and FFTSmoothingOperator
parent
a35d8a83
Pipeline
#15657
failed with stages
in 6 minutes and 20 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty/operators/diagonal_operator/diagonal_operator.py
View file @
7b2afe4d
...
@@ -286,7 +286,7 @@ class DiagonalOperator(EndomorphicOperator):
...
@@ -286,7 +286,7 @@ class DiagonalOperator(EndomorphicOperator):
distribution_strategy
=
axes_local_distribution_strategy
)
distribution_strategy
=
axes_local_distribution_strategy
)
local_diagonal
=
redistr_diagonal_val
.
get_local_data
(
copy
=
False
)
local_diagonal
=
redistr_diagonal_val
.
get_local_data
(
copy
=
False
)
reshaper
=
[
x
.
shape
[
i
]
if
i
in
active_axes
else
1
reshaper
=
[
x
.
val
.
data
.
shape
[
i
]
if
i
in
active_axes
else
1
for
i
in
xrange
(
len
(
x
.
shape
))]
for
i
in
xrange
(
len
(
x
.
shape
))]
reshaped_local_diagonal
=
np
.
reshape
(
local_diagonal
,
reshaper
)
reshaped_local_diagonal
=
np
.
reshape
(
local_diagonal
,
reshaper
)
...
...
nifty/operators/smoothing_operator/fft_smoothing_operator.py
View file @
7b2afe4d
...
@@ -46,7 +46,7 @@ class FFTSmoothingOperator(SmoothingOperator):
...
@@ -46,7 +46,7 @@ class FFTSmoothingOperator(SmoothingOperator):
local_transformed_x
=
transformed_x
.
val
.
get_local_data
(
copy
=
False
)
local_transformed_x
=
transformed_x
.
val
.
get_local_data
(
copy
=
False
)
local_kernel
=
kernel
.
get_local_data
(
copy
=
False
)
local_kernel
=
kernel
.
get_local_data
(
copy
=
False
)
reshaper
=
[
transformed_x
.
shape
[
i
]
if
i
in
coaxes
else
1
reshaper
=
[
local_
transformed_x
.
shape
[
i
]
if
i
in
coaxes
else
1
for
i
in
xrange
(
len
(
transformed_x
.
shape
))]
for
i
in
xrange
(
len
(
transformed_x
.
shape
))]
local_kernel
=
np
.
reshape
(
local_kernel
,
reshaper
)
local_kernel
=
np
.
reshape
(
local_kernel
,
reshaper
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment