Giter Site home page Giter Site logo

hopfield-network-go's Introduction

hmcalister Metrics

hopfield-network-go's People

Contributors

hmcalister avatar

Stargazers

 avatar

Watchers

 avatar

hopfield-network-go's Issues

Add functionality for multi-unit updates

Currently, the Hopfield network updates one unit at a time (the default behavior). It would be interesting to add functionality to update more than one unit per matrix multiplication.

Delta learning rule takes a long time

Profiling shows that the delta learning rule is taking a very long time - mostly due to serial relaxation of states! This should be shifted to concurrent relaxation.
profile001

Fix activation timing

Currently the activation function is applied before setting the unit in the state vector. This means activations that use the state vector will be incorrectly calculated.

Fix chunking function to actually chunk correctly

Currently the chunking function does not chunk correctly, as it iterates up one element at a time. This results in many chunks having the same elements, which is not ideal!

The fix here is to change the chunkingFunction for loop increment from i++ to i+=chunkSize

Flag Cleanup

Currently a lot of network behavior is tied up in messy constant definitions. It would be better to make everything into a flag for command line argument parsing.

Abstract functions to add data handlers

Data handlers currently all define a new function on a DataCollector to add an instance of the handler. It would be better to have an abstract AddDataHandler function that takes an instantiated instance of a type.

Fix bug where NaNs appear in states and unit energies

It appears that occasionally (actually very often) NaNs will appear in the states and unit energies of relaxing states when using ConcurrentRelaxStates. This should be considered a major bug, and needs to be addressed very quickly.

Remove network domain dependence

Network domain can be altered in the source code itself in future, as it would be a sufficiently large enough change. I am making a model not an enterprise solution!

Change random matrix initialization to use small values

Currently the random matrix initialization uses a standard normalization. This means the random starting values could be significant (e.g. >1) . Changing the sigma in this call to something smaller would have the same effect but less impact on learning.

Implement a better data collection framework

Currently, data collection occurs in the main method and is changed as the experiment requires. It would be nice to have an easier method to select data collection. For example, having a DataCollector struct that can be built to required specifics (and hence easily specified) and have callbacks in the HopfieldNetwork methods.

Data writer often corrupts file

For some reason, the data file tends to sometimes corrupt data - either writing incorrect number of rows into the file or missing data in some columns compared to others.

Remove Trial Index from data collector structs

Trial index is currently left over in the data collector structs. Because trials are no longer supported in the simulation directly, it would be best to remove trial index from these structs

Improve Docstrings

Currently, Docstrings use an ugly syntax looking like

  • argName: ...

It would be much nicer to simplify these. Perhaps to something like:

argName: ...

Activation functions currently do not enforce symmetric units

The Hopfield network works best when states are equal to their inverse. This can be implemented by reversing states with a low-value first unit (forcing the first unit to always be the high value) and altering all other units to match, or by breaking the symmetry with a bias unit.

Allow easy change between chunking and non-chunking updates

Chunking may result in poor performance for, e.g., chunkSize = 1. In this case we don't even need to chunk, just iterate over the original list!!

It would be nice to have a special case for chunkSize = 1 that does not require the (relatively) expensive chunking function.

Implement chunking function

Implement a chunking function that converts a slice into multiple slices of a specified length.

This will be required by #7

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.