Skip to content
GitLab
Menu
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
6a8759d2
Commit
6a8759d2
authored
Jul 16, 2019
by
Lukas Platz
Browse files
cleanup
parent
2e60bc93
Pipeline
#51977
failed with stages
in 14 minutes and 29 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty5/operators/convolution_operators.py
View file @
6a8759d2
...
...
@@ -90,18 +90,18 @@ def _ConvolutionOperator(domain, kernel, space=None, without_mean=False):
wgt
=
WeightApplier
(
domain
,
space
,
1
)
op
=
HT
(
diag
(
HT
.
adjoint
(
wgt
)))
if
without_mean
:
return
_ApplicationWithoutMeanOperator
(
domain
,
op
)
return
_ApplicationWithoutMeanOperator
(
op
)
else
:
return
op
class
_ApplicationWithoutMeanOperator
(
EndomorphicOperator
):
def
__init__
(
self
,
domain
,
op
):
def
__init__
(
self
,
op
):
self
.
_capability
=
self
.
TIMES
|
self
.
ADJOINT_TIMES
self
.
_domain
=
domain
if
op
.
domain
!=
op
.
target
:
raise
TypeError
(
"Operator needs to be endomorphic"
)
self
.
_domain
=
op
.
domain
self
.
_op
=
op
if
(
op
.
domain
!=
domain
)
or
(
op
.
domain
!=
op
.
target
):
raise
TypeError
(
"domains incompatible"
)
def
apply
(
self
,
x
,
mode
):
self
.
_check_input
(
x
,
mode
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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