Comments (4)
I've switched to doing the progress bar updates from a callback:
mantidproject/mantidimaging@5006fd3
It would be good if there was a mention in the release notes about the change.
from cil.
So far algo.max_iteration
is used, although we would like to discourage it in favour of the algo.run
method with callbacks.
Also, next
has been removed (it was there for compatibility with Python2) but __next__
is still there.
from cil.
For now you could use:
algo = PDGH(...)
algo.max_iterations = 1000000
for i in iter(algo):
... # do something with algo
but it might stop working in a future release.
Best is:
from cil.optimisation.utilities.callbacks import Callback, ProgressCallback
class EachIterCallback(Callback):
def __call__(self, algo):
... # do something with algo
algo = PDHG(...)
algo.run(1000000, callbacks=[ProgressCallback(), EachIterCallback()])
vis. https://tomographicimaging.github.io/CIL/v24.0.0/optimisation/#callbacks
If you've made any custom callbacks you think others will benefit from (e.g. TensorboardCallback
or something) please do open a PR adding it to Wrappers/Python/cil/optimisation/utilities/callbacks.py!
from cil.
I've switched to doing the progress bar updates from a callback: mantidproject/mantidimaging@5006fd3
lgtm!
It would be good if there was a mention in the release notes about the change.
Unfortunately it is mentioned in the highly inaccessible CIL@master:/CHANGELOG.md but for some unknown reason @TomographicImaging/cil-developers seem to dislike keeping the more standard CIL/releases readable/helpful/neat/up-to-date/in-sync 😠
from cil.
Related Issues (20)
- Documentation for code which relies on optional packages is not rendered HOT 5
- islicer should raise error if origin is set to an unexpected string
- Inconsistency in how logging works across CIL HOT 1
- Automatically tested code examples in the documentation
- GPU test markers
- CIL unittests on windows test_dataexample.TestRemoteData
- Upgrade TIGRE plugin to TIGRE 2.6 HOT 3
- Add options for step-size rules and pre-conditioners to the GD algorithm
- SGD documentation - small changes HOT 1
- PDHG and new callbacks HOT 2
- docker: `23.1.1` HOT 1
- functions and `out` argument HOT 2
- Documentation: TIGRE plugin docs are not rendered
- Incorrect objective calculation for SIRT HOT 1
- Gradient descent objective is stored twice for the initial value
- docstring ugly formatting for Algorithm
- callbacks not a package and limited doc available HOT 2
- Add functionality to islicer for 2D data
- BlockDataContainer geometry and pnorm
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 cil.