Comments (12)
What would the action of that be?
(op+vec)(x) = op(x) + vec*x
right?
from odl.
If we do this we clearly want to add a op - vec
aswell.
from odl.
I was more thinking of (op+vec)(x) = op(x) + vec
, for range elements at least. Actually mostly op-vec
, as you wrote, as in residual_op = op - vec
.
from odl.
If there is no obvious behavior of this operator overload, then it's probably better to just create a class to support it.
from odl.
Actually, your proposed action is already covered by op + vec.T
, right?
from odl.
I dont think we should do what you propose then, simply because it would violate the distributive law.
What you said is equivalent to
(op + vec.T)(x) = op(x) + x.inner(vec)
I think we should implement this as a named operator in default_ops
.
from odl.
Err, I don't quite follow. This is already supported, or am I missing something? vec.T
is an Operator
, and that you can add to op
as long as op
is a functional.
Can you be more specific about the distributive law violation? I don't see it.
from odl.
op + vec.T
is supported where op
is a functional, indeed.
Regarding violating the distributive law, one would expect
(A+B)(x) = A(x) + B(x)
Here A=op
so the intepretation is obvious, but with B=vec
this is nonobvious. For most of us, one generally inteprets vec
as multiplication by the vector. See e.g. our quasi-newton algorithm
(vec * vec.T)(x) = vec * vec.T(x)
The other case doesnt realy make sense to me, then we would have vec(x) = vec
, which doesnt realy rhyme for me, and I've never seen this use in the literature (I think).
One option would be to add (and we prolly should do this anyhow) a function called ConstantOperator
such that:
ConstantOperator(vec)(x) = vec
That way we could write, very clearly
(A - ConstantOperator(vec))(x) = A(x) - vec
from odl.
Any decision on this?
from odl.
Dunno. But the expression type operator looks fine to me, and if we want some shortcut later, we can still add it. Or just forget about that this issue ever existed 😉
from odl.
Does the ConstantOperator
exist? We may want to implement it together with the ResidualOperator
.
from odl.
Proposal made for that, closing this.
from odl.
Related Issues (20)
- Do ADMM and PDHG algorithms have positivity constraints or padding?
- ImportError: cannot import name 'OperatorAsModule' from 'odl.contrib.torch' HOT 1
- Proximal of LInfty wrong? HOT 7
- pytorch autograd depreciated HOT 4
- FBP not scaled when PYFFTW_AVAILABLE is True HOT 4
- odl.tomo.backends.skimage_randon.skimage_radon_back_projector not compatible with skimage==0.19
- primal_dual_hybrid_gradient solver: why compute derivative ? HOT 1
- Reconstruct Mayo dataset - errors in importing statements
- odl.operator.operator.OpDomainError: unable to cast tensor to an element of the domain uniform_discr
- question about odl_torch.OperatorModule
- Error with compatibility with latest numpy version HOT 1
- RayTransform: ValueError: The 'astra_cuda' `impl` is not found. HOT 6
- The problem about indexing parallel2Dgeometry HOT 1
- BroadcastOperator doesn't work with scipy > 1.8.1 HOT 4
- AttributeError: module 'numpy' has no attribute 'object' HOT 3
- Python version HOT 2
- Dishing artifact and value shift with FanBeamGeometry
- AttributeError: module 'odl' has no attribute 'Operator'
- Issue with using callback to show intermediate results in iterative solvers HOT 3
- Failing unit tests for product spaces HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from odl.