diff options
| author | Your Name <[email protected]> | 2026-08-24 12:39:57 -0700 |
|---|---|---|
| committer | Your Name <[email protected]> | 2026-08-24 12:39:57 -0700 |
| commit | 50dbc1066944263e43c0bf4bc62f8a848e1e6eba (patch) | |
| tree | e8df411bdab9b3d02f98ac863fe05541c2bce8cb /references | |
| parent | e2738f53a462393a75be9d54fa73e7a231014b71 (diff) | |
removed references directory
Diffstat (limited to 'references')
| -rw-r--r-- | references/crossbar__goal.cir | 57 | ||||
| -rw-r--r-- | references/memristor_spires_proof.png | bin | 86864 -> 0 bytes | |||
| -rw-r--r-- | references/spires_tutorial.c | 80 | ||||
| -rw-r--r-- | references/summer_projects_v3.pdf | bin | 252749 -> 0 bytes |
4 files changed, 0 insertions, 137 deletions
diff --git a/references/crossbar__goal.cir b/references/crossbar__goal.cir deleted file mode 100644 index 5668221..0000000 --- a/references/crossbar__goal.cir +++ /dev/null @@ -1,57 +0,0 @@ -*========================================================== -* 2x2 HP Memristor Crossbar -*========================================================== - -.include "hp_memristor.cir" - -****************************************************** -* Input Voltages (Rows) -****************************************************** - -.param VIN0=0.25 -.param VIN1=0.75 - -VROW0 row0 0 DC {VIN0} -VROW1 row1 0 DC {VIN1} - -****************************************************** -* Memristor Array -****************************************************** - -X00 row0 col0 memristor PARAMS: Rinit=1k -X01 row0 col1 memristor PARAMS: Rinit=100k -X02 row0 col2 memristor PARAMS: Rinit=50k -X03 row0 col3 memristor PARAMS: Rinit=70k - -X10 row1 col0 memristor PARAMS: Rinit=1k -X11 row1 col1 memristor PARAMS: Rinit=100k -X12 row1 col2 memristor PARAMS: Rinit=50k -X13 row1 col3 memristor PARAMS: Rinit=70k - -****************************************************** -* Column Loads -****************************************************** - -RLOAD0 col0 0 1k -RLOAD1 col1 0 1k -RLOAD2 col2 0 1k -RLOAD3 col3 0 1k - -****************************************************** -* Simulation -****************************************************** - -.tran 1n 100n uic - -.control - -run - -print v(col0) -print v(col1) -print v(col2) -print v(col3) -save all -.endc - -.end diff --git a/references/memristor_spires_proof.png b/references/memristor_spires_proof.png Binary files differdeleted file mode 100644 index ea294fc..0000000 --- a/references/memristor_spires_proof.png +++ /dev/null diff --git a/references/spires_tutorial.c b/references/spires_tutorial.c deleted file mode 100644 index f4eba10..0000000 --- a/references/spires_tutorial.c +++ /dev/null @@ -1,80 +0,0 @@ -#include <../src/neurons/lif_discrete.h> -#include <math.h> -#include <spires.h> -#include <stdio.h> -#include <stdlib.h> - -#define N_TRAIN 500 -#define N_TEST 100 -#define PI 3.14159265358979323846 - -int main(void) { - /* 1. Configure the reservoir */ - double lif_cfg[] = {0.0, 1.0, 0.2, 0.5}; - - spires_reservoir_config cfg = { - .num_neurons = 400, - .num_inputs = 1, - .num_outputs = 1, - .spectral_radius = 0.95, - .ei_ratio = 0.8, - .input_strength = 0.1, - .connectivity = 0.1, - .dt = 1.0, - .connectivity_type = SPIRES_CONN_RANDOM, - .neuron_type = SPIRES_NEURON_LIF_DISCRETE, - .neuron_params = lif_cfg, - }; - - /* 2. Create the reservoir */ - spires_reservoir *r = NULL; - spires_status s = spires_reservoir_create(&cfg, &r); - if (s != SPIRES_OK) { - fprintf(stderr, "Failed to create reservoir: %d\n", s); - return 1; - } - - /* 3. Generate training data — predict sin(t+1) from sin(t) */ - double input_train[N_TRAIN]; - double target_train[N_TRAIN]; - for (int i = 0; i < N_TRAIN; i++) { - input_train[i] = sin(2.0 * PI * i / 50.0); - target_train[i] = sin(2.0 * PI * (i + 1) / 50.0); - } - - /* 4. Train with ridge regression */ - s = spires_train_ridge(r, input_train, target_train, N_TRAIN, 1e-6); - - if (s != SPIRES_OK) { - fprintf(stderr, "Training failed: %d\n", s); - spires_reservoir_destroy(r); - return 1; - } - - /* 5. Generate test input */ - double input_test[N_TEST]; - for (int i = 0; i < N_TEST; i++) { - input_test[i] = sin(2.0 * PI * (N_TRAIN + i) / 50.0); - } - - /* 6. Run inference */ - double *predictions = spires_run(r, input_test, N_TEST); - if (!predictions) { - fprintf(stderr, "Inference failed\n"); - spires_reservoir_destroy(r); - return 1; - } - - /* 7. Print a few predictions vs. expected values */ - printf("Step | Predicted | Expected\n"); - printf("-----+-----------+---------\n"); - for (int i = 0; i < 10; i++) { - double expected = sin(2.0 * PI * (N_TRAIN + i + 1) / 50.0); - printf("%4d | %+.5f | %+.5f\n", i, predictions[i], expected); - } - - /* 8. Clean up */ - free(predictions); - spires_reservoir_destroy(r); - return 0; -} diff --git a/references/summer_projects_v3.pdf b/references/summer_projects_v3.pdf Binary files differdeleted file mode 100644 index d7cb0be..0000000 --- a/references/summer_projects_v3.pdf +++ /dev/null |
