UNPKG

relu

Version:

ReLU, the rectified linear unit

38 lines (28 loc) 988 B
[![Build Status](https://travis-ci.org/kaelzhang/relu.svg?branch=master)](https://travis-ci.org/kaelzhang/relu) [![Coverage](https://codecov.io/gh/kaelzhang/relu/branch/master/graph/badge.svg)](https://codecov.io/gh/kaelzhang/relu) <!-- optional appveyor tst [![Windows Build Status](https://ci.appveyor.com/api/projects/status/github/kaelzhang/relu?branch=master&svg=true)](https://ci.appveyor.com/project/kaelzhang/relu) --> <!-- optional npm version [![NPM version](https://badge.fury.io/js/relu.svg)](http://badge.fury.io/js/relu) --> <!-- optional npm downloads [![npm module downloads per month](http://img.shields.io/npm/dm/relu.svg)](https://www.npmjs.org/package/relu) --> <!-- optional dependency status [![Dependency Status](https://david-dm.org/kaelzhang/relu.svg)](https://david-dm.org/kaelzhang/relu) --> # relu The rectified linear unit. ## Install ```sh $ npm install relu ``` ## Usage ```js import relu from 'relu' relu(-1) // 0 relu(1) // 1 ``` ## License MIT