npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

simple-tensorflow

v1.0.14

Published

Simplificación de la libreria tensorflow.js para que sea mas facil de usar.

Downloads

6

Readme

Un npm que simplifica bastante la libreria tensorflow.js. Creador

Instalación

Antes de instalarlo, debe tener instalado Node.js y Python 2.7 La instalación se realiza mediante el comando de instalación npm:

$ npm install simple-tensorflow --save

Características

  • Reducción de dificultad para crear una red neuronal
  • Separación de las capas
  • User-Friendly
  • Entrenamiento Rapido

Conceptos Basicos

  • Las capas son la estructura del cerebro de la red neuronal,la primera capa de los modelos siempre debe llevar la dimensión del input
  • Las perdidas son diferentes funciones para evaluar que tan bien/mal lo esta haciendo la red neuronal,la mejor depende para que se este utilizando.
  • Los optimizadores son la manera en la que la red neuronal se adapta a los datos.

Opciones Modelo

Perdida

  • meanSquaredError
  • meanAbsoluteError
  • meanAbsolutePercentageError
  • meanSquaredLogarithmicError
  • squaredHinge
  • hinge
  • categoricalHinge
  • logcosh
  • categoricalCrossentropy
  • sparseCategoricalCrossentropy
  • binaryCrossentropy
  • kullbackLeiblerDivergence
  • poisson
  • cosineProximity

Optimizadores

  • sgd
  • momentum
  • adagrad
  • adadelta
  • adam
  • adamax
  • rmsprop

Opciones

  • iteraciones: Numero de veces que la red aprendera los datos.
  • aleatorio: Esto indicara si se cambiara el orden de los datos.
  • logs: Numero del 0 al 2 que indicara cuanta información se dara en cada entrenamiento por medio de la consola.

Capas

  • Dense
  • BatchNormalization
  • Reshape
  • Conv2D

Configuración de las capas

Cada capa puede tener una configuración diferente pero esta es la configuración que suelen tener todas

  • neuronas
  • activacion
  • entrada

Activaciones

Las capas necesitan una función de activación para funcionar correctamente

  • elu
  • hardSigmoid
  • linear
  • relu
  • relu6
  • selu
  • sigmoid
  • softmax
  • softplus
  • softsign
  • tanh
  • swish
  • mish

Ejemplos

Ejemplo 1: XOR Basico

const neural = require('simple-tensorflow')

let capa1 = new neural.Dense({neuronas:2,entrada:2})
let capa2 = new neural.Dense({neuronas:1})

const modelo = new neural.Modelo([capa1,capa2],'meanSquaredError','sgd')

let datosx = [[1,1],[1,0],[0,1],[0,0]]
let datosy = [0,1,1,0]

modelo.entrenar(datosx,datosy,{
  iteraciones:5,
  aleatorio:true
}).then(() => {
  let entrada = [[1,1]]
  let resultado = modelo.predecir(entrada)
  console.log(resultado) //Si usaste [1,1] o [0,0] al ser un XOR debe darte un numero cercano a 0 pero si usaste [1,0] o [0,1] debe darte un numero cercano a 1
})

Creado por: Discord Safe