ivanyashchuk / jax-fenics-adjoint Goto Github PK
View Code? Open in Web Editor NEWDifferentiable interface to FEniCS/Firedrake for JAX using dolfin-adjoint/pyadjoint
License: MIT License
Differentiable interface to FEniCS/Firedrake for JAX using dolfin-adjoint/pyadjoint
License: MIT License
Something has changed in JAX and now tests fail because the returned jvp tangent contains nans in place of zeros.
Examples use old function names and should be updated.
It's a good idea to add to CI with a maximum number of iterations to test they run without fails.
Hi Ivan,
in the notebook, we have the function
@build_jax_fem_eval(solve_templates)
def fenics_solve(f):
I try to use jax.vmap. It works in the test files, where we just want to compute outputs of u. However, inside the neural network
def eval_nn(net_params):
f_nn = np.ravel(net_apply(net_params, W.tabulate_dof_coordinates()))
u = vmap(fenics_solve(f_nn))
norm_u = np.linalg.norm(u)
return norm_u
but it does not work. For example, in the case that we deal with multiple samples.
Can you give me further guidance?
Thank you.
This commit google/jax@632876d removed defvjp_all
and defjvp_all
functions from JAX.
I need to update the way we register custom derivatives.
Hi @IvanYashchuk . Thank you for creating this amazing interface for JAX with FEniCS !! I am receiving the following error and was hoping you could help me out with it.
Error occurs when I run my code with @jit
Please let me know if you require anymore information.
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.