Skip to content

Commit

Permalink
Fix doc wording.
Browse files Browse the repository at this point in the history
  • Loading branch information
matham committed Aug 1, 2021
1 parent a805a72 commit a6f90db
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 22 deletions.
37 changes: 19 additions & 18 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@ for complete documentation.

-----------------

A PyTorch-based modeling framework for neuromorphic olfaction.
A PyTorch-based framework for neuromorphic modeling.

Sapicore is a framework which provides a high level abstractions for writing
neuromorphic models using pytorch. Sapicore does not contain any concrete models,
instead each model should have its own repo that implements the Sapicore
Sapicore is a framework that provides high level abstractions to help write
neuromorphic models using pytorch. Sapicore itself does not contain any concrete
models, instead each model may have its own repo that implements the Sapicore
components used by the model.

For example, the EPL-feed-forward model implemented using Sapicore can be found
`here <https://github.com/cplab/sapinet_eplff>`_. Following this methodology
will allow Sapicore to be used by multiple models independently without
each polluting the other with different implementation details or
requirements.
Following this methodology will allow Sapicore to be used by multiple models
independently, without each polluting the other with different implementation
details or requirements.

Models Sapicore common to a lab can be placed in a package outside the
Sapicore models common to a lab can be placed in a package outside the
framework and re-used by other projects that want to use these common models.

Sapicore supports user model configuration using the ``tree-config`` package.
Similarly, Sapicore supports annotating variables and buffers for logging
to e.g. ``tensorboardx`` for live display or using ``nixio`` HDF5 based
files for later analysis or debugging.
Sapicore supports model user-configuration using the
`tree-config <https://github.com/matham/tree-config/>`_ package.
Similarly, Sapicore supports annotating properties and buffers for logging
to e.g. ``tensorboardx`` for live display or using
`nixio <https://github.com/G-Node/nixpy>`_ HDF5 based files for later analysis or
debugging.

Installation
------------
Expand All @@ -34,13 +34,14 @@ Sapicore has minimal requirements. It requires

* Python 3.7+
* Pytorch 1.5+ (see `PyTorch installation <https://pytorch.org/get-started/locally/>`_).
* Scientific stack (see ``setup.py``) and tensorboard and tensorboardx (optional).
* Scientific stack (see the list in ``setup.py``).
* Tensorboard and tensorboardx (optional).

The easiest way is to install them with conda as follows::

conda install -c conda-forge numpy tqdm pandas ruamel.yaml tensorboard tensorboardx

or using pip, simply::
or using pip, simply (pip automatically installs the remaining dependencies)::

python -m pip install tensorboard tensorboardx

Expand Down Expand Up @@ -122,8 +123,8 @@ can be found under sapicore/examples.
def apply_learning(
self, pre_neuron: SimpleNeuron, synapse: SimpleSynapse,
post_neuron: SimpleNeuron, **kwargs):
synapse.weight *= torch.abs_(pre_neuron.activation) * \
torch.abs_(post_neuron.activation)
synapse.weight *= torch.abs(pre_neuron.activation) * \
torch.abs(post_neuron.activation)
class MyModel(SapicoreModel):
Expand Down
6 changes: 3 additions & 3 deletions examples/basic_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ def apply_learning(
self, pre_neuron: SimpleNeuron, synapse: SimpleSynapse,
post_neuron: SimpleNeuron, **kwargs):
"""Called to apply learning to the given neurons."""
synapse.weight *= torch.abs_(pre_neuron.activation) * \
torch.abs_(post_neuron.activation) * self.attenuation
synapse.weight *= torch.abs(pre_neuron.activation) * \
torch.abs(post_neuron.activation) * self.attenuation


class MyModel(SapicoreModel):
Expand Down Expand Up @@ -342,7 +342,7 @@ def run(self) -> None:
if __name__ == '__main__':
# create and run the model
pipeline = SimplePipeline()
# pipeline.run()
pipeline.run()

# print logged data
with NixLogReader(join(pipeline.root_path, 'debug_logging.h5')) as reader:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
setup(
name="sapicore",
version=__version__,
description="A PyTorch-based modeling framework for neuromorphic olfaction",
description="A PyTorch-based framework for neuromorphic modeling",
long_description=long_description,
url="https://github.com/cplab/sapicore",
author="Neuromorphic algorithms by Ayon Borthakur, Chen Yang, "
Expand Down

0 comments on commit a6f90db

Please sign in to comment.