#networking #parallelism #connection #input #neuron #unsupervised #power-network

yanked ctrnn

Supervised and unsupervised CTRNNs with parallelism

3 releases

0.1.2 Aug 16, 2024
0.1.1 Aug 16, 2024
0.1.0 Aug 16, 2024

#7 in #unsupervised

MIT license

55KB
1.5K SLoC

CTRNN

CTRNN framework for Rust.

Network types:

  • HashNetwork: Network with flexible HashMap neuron connections, ideal for large, sparse networks.
  • SsmNetwork: Single-threaded network using a centralized synaptic strength matrix.
  • PowerNetwork: Multi-threaded, distributable network using a centralized synaptic strength matrix.

Usage:

use ctrnn::PowerNetwork;

// PowerNetwork(size, d_in, d_out, worker_cores)
let mut power = PowerNetwork::new(24, 1, 1, 8).unwrap();

// PowerNetwork.weave(neural_density)
power.weave(0.8)

// PowerNetwork.forward(inputs, next_tau, step_size)
let inputs = vec![0.3];
let next_tau = ctrnn::get_ts() + 3.;
let step_size = 0.001;

power.forward(inputs, next_tau, step_size);

let losses: Vec<f64> = my_loss_fn();
let learning_rate = 0.01;

power.backward(learning_rate, losses).unwrap();

Dependencies

~2.9–6MB
~110K SLoC