Skip to main content

A fast generative model for stochastic memory cells

Project description

Synaptogen.py

This is a quick translation of Synaptogen into Python.

The code is not highly optimized and is considerably slower than the Julia version.

Installation

pip install synaptogen

Examples

This basic example does the following:

  • Initialize a million memory cells (in their high resistance states)
  • Apply -2 V to each cell, putting them into their low resistance states
  • Apply a random voltage to each cell
  • Make a current readout of all the cells individually (at a default of 0.2 V)
  • Perform a "Vector Matrix Multiplication" by 1024×1024 crossbar readout
from synaptogen import *
import numpy as np
M = 1024 * 1024
cells = CellArrayCPU(M)

applyVoltage(cells, -2)

voltages = np.random.randn(M)
applyVoltage(cells, voltages)

I = Iread(cells)

col_voltages = np.random.randn(2**5) * .2
row_currents = cells @ col_voltages

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

synaptogen-0.2.0.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

synaptogen-0.2.0-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file synaptogen-0.2.0.tar.gz.

File metadata

  • Download URL: synaptogen-0.2.0.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.7

File hashes

Hashes for synaptogen-0.2.0.tar.gz
Algorithm Hash digest
SHA256 90fc55504342a022c3b60597d4a804a3ef34c0b244f2e988f9d3e2a52f71d183
MD5 7a7ae4cc90a87db23dc6ab59e7ecfb20
BLAKE2b-256 68434cc1d6dfaf7e9cba7b235b69b4b7e3b26ececcf8a1b57825a5d3a7915cb2

See more details on using hashes here.

File details

Details for the file synaptogen-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: synaptogen-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 15.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.7

File hashes

Hashes for synaptogen-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1e69beb7ae86523488337793fe40ddf6290e86f61c6abdbee8018185866dfe67
MD5 0573e8c27a807e30346aaca73441a6af
BLAKE2b-256 b57a785c9fee42d4128947455f78da31b35ec28f50ee499e974f5df5cbfa3e84

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page