flpgrz / fractal-jax Goto Github PK
View Code? Open in Web Editor NEWGenerate images of the Julia and Mandelbrot sets with Jax.
License: MIT License
Generate images of the Julia and Mandelbrot sets with Jax.
License: MIT License
Hello I am looking for a 3d dichotomic irregular fractal that would look like branching blood vessels and similar to branching planes - to simulate connective tissue layers
The algorithm would need to be parameterized and differentiable.
The basic plan is to learn the parameters of the fractal by comparing l2 similarity between the original and fractal-generated image (additionally for fine-grained texture Fourier will be used.
Would it be possible to use your tool for it ?)
Just wanted to let you know that line 55 reads:
fractal = jax.numpy.where(diverging_now, i / self.iterations, fractal)
I'm not sure where the / self.iterations
came from, but it's incorrect and producing Julia sets with no color variation at all. You can see that the analagous Mandelbrot line on line 43 does not include that part and functions correctly:
fractal = jax.numpy.where(diverging_now, i, fractal)
The given code examples use 50 iterations, which executes performantly on the GPU, but is only useful for "toy" fractal renderings.
With just a little bit of zoom, you'll quickly be wanting 1,000 or 10,000 iterations (or far more).
Unfortunately GPU compilation of the function then takes minutes and/or runs out of memory completely, due to "loop unrolling". I've commented on the code Fractal Jax uses as a model (which suffers the same issue), and a solution is given here.
I'm not expecting Fractal Jax to be updated, but I just want to leave this issue open as a warning in case anyone else struggles with Fractal Jax performance, and these links explain how to fix it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.