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
b68268b0
Commit
b68268b0
authored
7 years ago
by
Martin Reinecke
Browse files
Options
Downloads
Patches
Plain Diff
SkyModelGradientOperator -> ModelGradientOperator
parent
c8cfecf6
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
nifty5/models/constant.py
+3
-4
3 additions, 4 deletions
nifty5/models/constant.py
nifty5/operators/__init__.py
+2
-2
2 additions, 2 deletions
nifty5/operators/__init__.py
nifty5/operators/model_gradient_operator.py
+4
-3
4 additions, 3 deletions
nifty5/operators/model_gradient_operator.py
with
9 additions
and
9 deletions
nifty5/models/constant.py
+
3
−
4
View file @
b68268b0
from
..operators
import
M
ultiSky
GradientOperator
from
..operators
.model_gradient_operator
import
M
odel
GradientOperator
from
.model
import
Model
...
...
@@ -9,8 +9,7 @@ class Constant(Model):
self
.
_value
=
self
.
_constant
self
.
_gradient
=
MultiSkyGradientOperator
({},
position
.
domain
,
self
.
_gradient
=
ModelGradientOperator
({},
position
.
domain
,
self
.
value
.
domain
)
def
at
(
self
,
position
):
...
...
This diff is collapsed.
Click to expand it.
nifty5/operators/__init__.py
+
2
−
2
View file @
b68268b0
...
...
@@ -12,7 +12,7 @@ from .power_distributor import PowerDistributor
from
.sampling_enabler
import
SamplingEnabler
from
.sandwich_operator
import
SandwichOperator
from
.scaling_operator
import
ScalingOperator
from
.
sky
_gradient_operator
import
M
ultiSky
GradientOperator
from
.
model
_gradient_operator
import
M
odel
GradientOperator
from
.smoothness_operator
import
SmoothnessOperator
__all__
=
[
"
LinearOperator
"
,
"
EndomorphicOperator
"
,
"
ScalingOperator
"
,
...
...
@@ -20,4 +20,4 @@ __all__ = ["LinearOperator", "EndomorphicOperator", "ScalingOperator",
"
FFTSmoothingOperator
"
,
"
GeometryRemover
"
,
"
LaplaceOperator
"
,
"
SmoothnessOperator
"
,
"
PowerDistributor
"
,
"
InversionEnabler
"
,
"
SandwichOperator
"
,
"
SamplingEnabler
"
,
"
DOFDistributor
"
,
"
M
ultiSky
GradientOperator
"
]
"
DOFDistributor
"
,
"
M
odel
GradientOperator
"
]
This diff is collapsed.
Click to expand it.
nifty5/operators/
sky
_gradient_operator.py
→
nifty5/operators/
model
_gradient_operator.py
+
4
−
3
View file @
b68268b0
from
..multi
import
MultiDomain
,
MultiField
from
..multi.multi_domain
import
MultiDomain
from
..multi.multi_field
import
MultiField
from
..sugar
import
full
from
.linear_operator
import
LinearOperator
class
M
ultiSky
GradientOperator
(
LinearOperator
):
class
M
odel
GradientOperator
(
LinearOperator
):
def
__init__
(
self
,
gradients
,
domain
,
target
):
super
(
M
ultiSky
GradientOperator
,
self
).
__init__
()
super
(
M
odel
GradientOperator
,
self
).
__init__
()
self
.
_gradients
=
gradients
gradients_domain
=
MultiField
(
self
.
_gradients
).
domain
self
.
_domain
=
MultiDomain
.
make
(
domain
)
...
...
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