mzszym / sparsegrad Goto Github PK
View Code? Open in Web Editor NEWsparsegrad - automatic computation of sparse Jacobian
Home Page: https://marekszymanski.com/software/sparsegrad/
License: GNU Affero General Public License v3.0
sparsegrad - automatic computation of sparse Jacobian
Home Page: https://marekszymanski.com/software/sparsegrad/
License: GNU Affero General Public License v3.0
Hi,
my objective function is:
def F(x):
A = np.diag(np.random.rand(100))
return np.diag(x**2) @ A @ x
For x0 = np.random.rand(100), the command:
F(ad.seed(x0))
returns:
ValueError: Input must be 1- or 2-d.
Is a matrix multiplication in an objective function unsupported?
This library does not support matrix operations
For example this does not work
import numpy as np
import sparsegrad.forward as ad
def f(x):
return x-x[::-1,::-1]
x=np.zeros((3,3))
print(f(ad.seed(x)).dvalue)
Would it be possible to add support for operations on matrices and Nd arrays ?
For the reference here is a matlab implementation for forward differentiation that support nd arrays.
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.