brainpy.base module
Contents
brainpy.base
module#
The base
module for whole BrainPy ecosystem.
This module provides the most fundamental class
Base
, and its associated helper classCollector
andArrayCollector
.For each instance of “Base” class, users can retrieve all the variables (or trainable variables), integrators, and nodes.
This module also provides a
Function
class to wrap user-defined functions. In each function, maybe several nodes are used, and users can initialize aFunction
by providing the nodes used in the function. Unfortunately,Function
class does not have the ability to gather nodes automatically.This module provides
io
helper functions to help users save/load model states, or share user’s customized model with others.This module provides
naming
tools to guarantee the unique nameing for each Base object.
Details please see the following.
Base Class#
|
The Base class for whole BrainPy ecosystem. |
Function Wrapper#
|
The wrapper for Python functions. |
Collectors#
A Collector is a dictionary (name, var) with some additional methods to make manipulation of collections of variables easy. |
|
A ArrayCollector is a dictionary (name, var) with some additional methods to make manipulation of collections of variables easy. |
Exporting and Loading#
|
Save variables into a HDF5 file. |
|
Save variables into a numpy file. |
|
Save variables into a pickle file. |
|
Save variables into a HDF5 file. |
|
Load variables in a HDF5 file. |
|
Load variables from a numpy file. |
|
Load variables from a pickle file. |
|
Load variables from a numpy file. |
Built-in mutable sequence. |
Naming Tools#
|
Check the uniqueness of the name for the object type. |
|
Get the unique name for the given object type. |
Clear the cached names. |