Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ideal Neuron Interface #4

Closed
luiscarbonell opened this issue Dec 10, 2018 · 3 comments
Closed

Ideal Neuron Interface #4

luiscarbonell opened this issue Dec 10, 2018 · 3 comments
Assignees
Labels
💬 discussion Open for Socratic debate 📖 documentation Regarding the documentation of a thing 🙏 help wanted Extra attention is needed 💡theory Regarding the theory of something
Projects

Comments

@luiscarbonell
Copy link
Member

luiscarbonell commented Dec 10, 2018

Ideal Neuron Interface

Properties

Key Description
bias Bias
rate Learning rate
activation Activation/squash function
connections All neuron connections
connections.incoming Incoming neuron connections
connections.outgoing Outgoing neuron connections

Instance Functions

Key Description
Neuron.prototype.is.input() Tests whether neuron has no input connections
Neuron.prototype.is.output() Tests whether neuron has no output connections
Neuron.prototype.project() Connects to another neuron, layer, or group
Neuron.prototype.activate() Activates neuron
Neuron.prototype.propagate() Updates neuron; propagates error

Class Constants

Key Description
Neuron.activation An object of typical activation/squash functions
Neuron.activation.SIGMOID sigmoid Squash Function
Neuron.activation.ReLU ReLU Squash Function
Neuron.activation.TANH tanh Squash Function
Neuron.activation.IDENTITY identity Squash Function
Neuron.activation.PERCEPTRON perceptron Squash Function
Neuron.update An object of typical activation/squash function derivatives
Neuron.activation.SIGMOID sigmoid Squash Function Partial Derivative
Neuron.activation.ReLU ReLU Squash Function Partial Derivative
Neuron.activation.TANH tanh Squash Function Partial Derivative
Neuron.activation.IDENTITY identity Squash Function Partial Derivative
Neuron.activation.PERCEPTRON perceptron Squash Function Partial Derivative

new Neuron()

  • new Neuron(): Creates a new neuron.
  • new Neuron({ inputs: [n0, n1], outputs: [n2] }): Creates a new neuron with n0 and n1 as incoming connections, and n2 as an outgoing connection.
  • new Neuron(n0): Creates a new neuron with the same connections as n0

.is.input([callback])

  • neuron.is.input(): Returns true if neuron has no incoming connections

.is.output([callback])

  • neuron.is.output(): Returns true if neuron has no outgoing connections

.project(object[, callback])

  • neuron.projects(other_neuron): Projects neuron to other_neuron
  • neuron.project(layer): Projects neuron to every neuron in layer
  • neuron.project(group): Projects neuron to every neuron in group

.activate(inputs[,callback])

  • .activate([0, 1, 0, 1]): Activates neuron with the given inputs; inputs.length must equal connections.length

.propagate(feedback[,callback])

  • .propagate([1, 0, 1, 0]): Updates weights, and propagates errors.
@luiscarbonell luiscarbonell added the 💡theory Regarding the theory of something label Dec 10, 2018
@luiscarbonell luiscarbonell added this to the Core Components milestone Dec 10, 2018
@luiscarbonell luiscarbonell self-assigned this Dec 10, 2018
@luiscarbonell luiscarbonell added this to To Do in Basics via automation Dec 10, 2018
@luiscarbonell luiscarbonell moved this from To Do to To Do (Urgent) in Basics Dec 10, 2018
@luiscarbonell
Copy link
Member Author

Supporting Forward and Backwards Passes

The following helps abstract away the particular activation function or algorithm for backpropagation.

let Neuron = (...) => {
  activate,
  learn,
  ...
  forward(...) {
    activate()
  },
  backward(...) {
    learn()
  }
}

@luiscarbonell luiscarbonell changed the title Neuron Architecture Ideal Neuron Interface Dec 10, 2018
@luiscarbonell luiscarbonell added 💬 discussion Open for Socratic debate 📖 documentation Regarding the documentation of a thing 🙏 help wanted Extra attention is needed labels Dec 10, 2018
@luiscarbonell luiscarbonell moved this from To Do (Urgent) to To Do (Important, Not Urgent) in Basics Dec 10, 2018
@luiscarbonell
Copy link
Member Author

luiscarbonell commented Dec 12, 2018

Static Activation Functions

Having class-wide activation function will help create neurons quickly.

  • Neuron.activation.SIGMOID
  • Neuron.activation.ReLU
  • Neuron.activation.TANH
  • Neuron.activation.IDENTITY
  • Neuron.activation.PERCEPTRON

CHECK: https://abdulapopoola.com/2013/03/30/static-and-instance-methods-in-javascript/

@luiscarbonell
Copy link
Member Author

Callback Invocation

Documentation does not show what callback is invoked with.

That would be useful.

Check async for a great example.

Basics automation moved this from To Do (Important, Not Urgent) to Done Jan 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💬 discussion Open for Socratic debate 📖 documentation Regarding the documentation of a thing 🙏 help wanted Extra attention is needed 💡theory Regarding the theory of something
Projects
No open projects
Basics
  
Done
Development

No branches or pull requests

1 participant