Giter VIP home page Giter VIP logo

sparsegrad's People

Contributors

mzszym avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

zwc662

sparsegrad's Issues

Matrix multiplication

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?

Support for numpy matrices and nd arrays

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.