SaveOutputEveryIteration Directive errors
See original GitHub issueCan no longer use the SaveOutputEveryIteration directive on the the dcip/dev branch. I get the following error when calling this function using Tikhonov regularization on a treemesh.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
***Done using same Solver and solverOpts as the problem***
Use Tikhonov
SimPEG.SaveOutputEveryIteration will save your inversion progress as: '###-InversionModel-2017-12-20-12-06.txt'
SimPEG.SaveModelEveryIteration will save your models as: '###-InversionModel-2017-12-20-12-06.npy'
model has any nan: 0
============================ Inexact Gauss Newton ============================
# beta phi_d phi_m f |proj(x-g)-x| LS Comment
-----------------------------------------------------------------------------
x0 has any nan: 0
0 1.22e-01 1.64e+05 7.60e+01 1.64e+05 2.35e+05 0
Traceback (most recent call last):
File "InvScript.py", line 225, in <module>
mopt = inv.run(m0)
File "/tera_raid/mmitchel/Programs/simpeg/SimPEG/Utils/CounterUtils.py", line 99, in wrapper
out = f(self, *args, **kwargs)
File "/tera_raid/mmitchel/Programs/simpeg/SimPEG/Inversion.py", line 67, in run
self.m = self.opt.minimize(self.invProb.evalFunction, self.invProb.model)
File "/tera_raid/mmitchel/Programs/simpeg/SimPEG/Utils/CounterUtils.py", line 99, in wrapper
out = f(self, *args, **kwargs)
File "/tera_raid/mmitchel/Programs/simpeg/SimPEG/Optimization.py", line 291, in minimize
self.doEndIteration(xt)
File "/tera_raid/mmitchel/Programs/simpeg/SimPEG/Utils/CounterUtils.py", line 88, in wrapper
out = f(self, *args, **kwargs)
File "/tera_raid/mmitchel/Programs/simpeg/SimPEG/Utils/codeutils.py", line 144, in wrapper
return f(self,*args,**kwargs)
File "/tera_raid/mmitchel/Programs/simpeg/SimPEG/Optimization.py", line 564, in doEndIteration
self.callback(xt)
File "/tera_raid/mmitchel/Programs/simpeg/SimPEG/Inversion.py", line 73, in _optCallback
self.directiveList.call('endIter')
File "/tera_raid/mmitchel/Programs/simpeg/SimPEG/Directives.py", line 170, in call
getattr(r, ruleType)()
File "/tera_raid/mmitchel/Programs/simpeg/SimPEG/Directives.py", line 351, in endIter
self.reg.objfcts[0](self.invProb.model) * self.reg.alpha_s
AttributeError: 'ComboObjectiveFunction' object has no attribute 'alpha_s'
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
How to Troubleshoot Angular "10 $digest() iterations reached ...
You're going to get this error message because Angular tries to have the "stability" and will execute the function until it returns the...
Read more >for:each template directives in LWC - Salesforce Blog - SfdcPoint
Click Save and activate. We will have the following output: for each template directives in LWC. iterator ...
Read more >Template::Manual::Directives
The FOREACH directive will iterate through the items in a list, processing the enclosed block for each one. [% foo = 'Foo' items...
Read more >27.4. Format Directive Interface
An arg, any Lisp object, is printed obeying every printer control variable ... ~I, and ~:T. As a result, an error is signaled...
Read more >4. Template Directives - Perl Template Toolkit [Book] - O'Reilly
With all of these directives, the results of processing the template are included in the output in place of the directive. The WRAPPER...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@fourndo: I understand we want to be able to handle several regularizers (that can be so powerful!). What I am less sure about, and not a big fan so far, is the discrepancy between the type of object when calling
*.reg
.Moreover, This also create inconsistency of interaction (as reported by @micmitch ) and naming convention. For example there is also now an inconsistency for the use of the term
objfcts
: in one casesel.reg.objfcts
is a full regularization (Simple
orTikhnov
object) while in the caseself.invProb.reg.objfcts
it calls the individual norms or portions (Small
orSmoothDeriv
…) . It seems we now defineobjfcts
as a handle to always access the next subdivision, but I am not sure of the name anymore in this case.So with my current understanding, Would not it be better then to also turn
invProb.reg
into aComboObjectiveFunction
object then to ensure consistency when calling areg
object?I believe the underlying bug here was fixed a while ago, as this is working in the more recent versions. However the discussion on how directives being tied to specific regularizations is still relevant.