Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NIFTy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ift
NIFTy
Commits
c803a3ec
There was a problem fetching the pipeline summary.
Commit
c803a3ec
authored
7 years ago
by
Martin Reinecke
Browse files
Options
Downloads
Patches
Plain Diff
efficiency tweaks
parent
151d7b24
No related branches found
No related tags found
No related merge requests found
Pipeline
#
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
nifty4/operators/chain_operator.py
+8
-0
8 additions, 0 deletions
nifty4/operators/chain_operator.py
nifty4/operators/scaling_operator.py
+1
-2
1 addition, 2 deletions
nifty4/operators/scaling_operator.py
nifty4/operators/sum_operator.py
+4
-0
4 additions, 0 deletions
nifty4/operators/sum_operator.py
with
13 additions
and
2 deletions
nifty4/operators/chain_operator.py
+
8
−
0
View file @
c803a3ec
...
...
@@ -99,6 +99,14 @@ class ChainOperator(LinearOperator):
def
target
(
self
):
return
self
.
_ops
[
0
].
target
@property
def
inverse
(
self
):
return
self
.
make
([
op
.
inverse
for
op
in
reversed
(
self
.
_ops
)])
@property
def
adjoint
(
self
):
return
self
.
make
([
op
.
adjoint
for
op
in
reversed
(
self
.
_ops
)])
@property
def
capability
(
self
):
return
self
.
_capability
...
...
This diff is collapsed.
Click to expand it.
nifty4/operators/scaling_operator.py
+
1
−
2
View file @
c803a3ec
...
...
@@ -81,8 +81,7 @@ class ScalingOperator(EndomorphicOperator):
def
capability
(
self
):
if
self
.
_factor
==
0.
:
return
self
.
TIMES
|
self
.
ADJOINT_TIMES
return
(
self
.
TIMES
|
self
.
ADJOINT_TIMES
|
self
.
INVERSE_TIMES
|
self
.
ADJOINT_INVERSE_TIMES
)
return
self
.
_all_ops
def
draw_sample
(
self
):
return
Field
.
from_random
(
random_type
=
"
normal
"
,
...
...
This diff is collapsed.
Click to expand it.
nifty4/operators/sum_operator.py
+
4
−
0
View file @
c803a3ec
...
...
@@ -122,6 +122,10 @@ class SumOperator(LinearOperator):
def
target
(
self
):
return
self
.
_ops
[
0
].
target
@property
def
adjoint
(
self
):
return
self
.
make
([
op
.
adjoint
for
op
in
self
.
_ops
],
self
.
_neg
)
@property
def
capability
(
self
):
return
self
.
_capability
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment