Giter Club home page Giter Club logo

tensor's Introduction

Tensor: Scientific Computing for PHP

PHP from Packagist Latest Stable Version Code Checks Extension Build Downloads from Packagist GitHub

A library and extension that provides objects for scientific computing in PHP.

Installation

Follow the instructions below to install either Tensor PHP or the Tensor extension.

Tensor PHP

Install Tensor PHP into your project with Composer:

$ composer require rubix/tensor

Tensor Extension

Install the Tensor extension via PECL:

$ pecl install tensor

Note: If both the library and extension are installed, the extension will take precedence.

Requirements

  • PHP 7.4 or above

Optional To Compile Extension

Manually Compiling the Extension

Clone the repository locally using Git:

$ git clone https://github.com/RubixML/Tensor

Make sure you have all the necessary build tools installed such as a C compiler and make tools. For example, on an Ubuntu linux system you can enter the following on the command line to install the necessary dependencies.

$ sudo apt-get install make gcc gfortran php-dev libopenblas-dev liblapacke-dev re2c build-essential

Then, change into the ext directory from the project root and run the following commands from the terminal. See this guide for more information on compiling PHP extensions with PHPize.

$ cd ./ext
$ phpize
$ ./configure
$ make
$ sudo make install

Finally, add the following line to your php.ini configuration to install the extension.

extension=tensor.so

To confirm that the extension is loaded in PHP, you can run the following command.

php -m | grep tensor

Performance Comparison

Tensor Performance MNIST

Tensor Performance Benchmarks

Contributing

See CONTRIBUTING.md for guidelines.

License

The code is licensed MIT and the documentation is licensed CC BY-NC 4.0.

tensor's People

Contributors

27pchrisl avatar andrewdalpino avatar cmb69 avatar mlocati avatar villfa avatar

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.