Package: nengo
Nengo: Large-scale brain modelling in PythonNengo is a Python library for building and simulating
large-scale neural models.
Nengo can create sophisticated
spiking and non-spiking neural simulations
with sensible defaults in a few lines of code.
Yet, Nengo is highly extensible and flexible.
You can define your own neuron types and learning rules,
get input directly from hardware,
build and run deep neural networks,
drive robots, and even simulate your model
on a completely different neural simulator
or neuromorphic hardware.InstallationNengo depends on NumPy, and we recommend that you
install NumPy before installing Nengo.
If you’re not sure how to do this, we recommend usingAnaconda.To install Nengo:pip install nengoIf you have difficulty installing Nengo or NumPy,
please read the more detailedNengo installation instructionsfirst.If you’d like to install Nengo from source,
please read thedeveloper installation instructions.Nengo is tested to work on Python 3.6 and above.
Python 2.7 and Python 3.4 were supported up to and including Nengo 2.8.0.
Python 3.5 was supported up to and including Nengo 3.1.ExamplesHere are six ofmany examplesshowing how Nengo enables the creation and simulation of
large-scale neural models in few lines of code.100 LIF neurons representing a sine waveComputing the square across a neural connectionControlled oscillatory dynamics with a recurrent connectionLearning a communication channel with the PES ruleSimple question answering with the Semantic Pointer ArchitectureA summary of the principles underlying all of these examplesDocumentationUsage and API documentation can be found athttps://www.nengo.ai/nengo/.To build the documentation yourself, run the following command:python setup.py build_sphinxThis requires Pandoc to be installed,
as well as some additional Python packages.
For more details,see the Developer Guide.DevelopmentInformation for current or prospective developers can be found
athttps://www.nengo.ai/contributing/.Getting HelpQuestions relating to Nengo, whether it’s use or it’s development, should be
asked on the Nengo forum athttps://forum.nengo.ai.Release history4.0.0 (November 16, 2023)AddedAddedgroupsparameter tonengo.Convolution. (#1675,#1684)ChangedMade NengoCore available under the GPLv2 license. (#1693)FixedFixed an issue wherenengo.LinearFilterand subclasses (e.g.Lowpass,Alpha) would fail when running on tensors with dimension >= 3. (#1687)3.2.0 (January 27, 2022)AddedAdded official support for Python 3.9. (#1660)AddedChannelShape.from_space_and_channelsto easily construct aChannelShapefrom a spatial shape and number of channels. (#1648)Added theConvolutionTransposetransform to perform transposed convolution.
It is commonly used for various forms of upsampling in deep networks. (#1648)AddedConvandConvTransposealiases forConvolutionandConvolutionTranspose. (#1648)ChangedThe minimum supported NumPy version is now 1.19, as earlier versions are
no longer officially supported. (NEP-29,#1683)RemovedRemoved support for Python 3.5 (which reached its end of life in
September 2020). (#1649)Removednengo.utils.graphs.graph(this was a small utility function for building
graphs that was only used in tests). (#1654)Removedsimulator.ProbeDictalias; this was previously renamed tosimulator.SimulationData. (#1649)FixedFixed a bug with a problematic cache index breaking decoder solvers. The solver now
avoids using the cache, rather than crashing. (#1649)Operator graph step order will now be deterministic. (#1654)Fixed an issue in which some simulators could not be reset due to signals
not being marked as readonly. (#1676)Fixed an inconsistency in which normalNodeoutput functions would receive
a copy of the input signal, whileProcessstep functions would not.Processstep functions now also receive copies. (#1679)Duplicate keys inNeurons.probeablehave been removed. (#1681)3.1.0 (November 17, 2020)AddedAdded a new example notebook for Legendre Memory Units.
(#1589)Added thestep_orderattribute tonengo.Simulator, which contains an
ordered list of the operations run on each timestep.
(#1615)Added themake_statemethod toNeuronType, which initializes the
neuron type’s state variables. (#1609)Added thespikingattribute toNeuronType, which exposes whether
a neuron type is spiking or non-spiking. (#1609)Added thenegativeattribute toNeuronType, which indicates whether
the neuron type can have negative outputs. (#1609)Added theTanhneuron type to simulate hyperbolic tangent neurons. (#1609)Added theRatesToSpikesNeuronType, which is a base class for neuron types
that convert a rate-based type to a spiking one. (#1609)Added theRegularSpikingneuron type, which emits regularly-spaced spikes
at the rate specified by its base type. (#1609)Added theStochasticSpikingneuron type, which emits spikes based on stochastic
rounding to roughly match the rate specified by its base type. (#1609)Added thePoissonSpikingneuron type, which emits Poisson-distributed spikes,
as are commonly used to match biological spiking statistics. (#1609)Added thePositiveNeuronTypetest argument to run tests on all neuron types
for whichnegativeis notTrue. (#1609)Added theQuasirandomSequencedistribution, which is similar toUniformbut spreads points across the space evenly. (#1611)Added theScatteredHyperspheredistribution, which is similar toUniformHyperspherebut spreads points across the space more evenly. (#1611)Added theRLS(recursive least-squares) learning rule, which is an online
version of the least-squares method typically used for offline decoder-solving.
(#1611,example)Added theSimProbeoperator, which marks a signal as being probed. (#1653)ChangedNengo is now compatible with Python 3.8. (#1628)The default Connection transform is nowNone, meaning that there will be
no transform applied. This only changes behavior when learning on a
neuron-neuron connection with the default scalar transform. In that situation
there are now no weights to apply learning to, so this will result in an
error. The old behaviour can be obtained by settingtransform=1.
(#1591)Network list attributes (e.g..ensembles,.connections,.probes) are now
read-only, to prevent users from accidentally overwriting them with their own data.
(#1545,#1608)TheNeuronType.step_mathmethod has been renamed toNeuronType.step.
(#1609)Neuron types can now create arbitrary state variables without needing to register
a new build function. Thestateclass attribute declares the neuron type’s
state variables and their default initial values. All__init__methods accept
aninitial_statedictionary for users to override the default initial state
values. (#1609)Thenlandnl_nodirecttest arguments have been renamed toAnyNeuronTypeandNonDirectNeuronType. (#1609)Weight solvers (i.e. those withweights=True) are now allowed on all connections.
For connections that are not betweenEnsembles, though, weight solvers have the
same effects as solvers withweights=False, and a warning will be raised.
(#1626)Various improvements to simulation speed. (#1629)EnsembleArraynow raises an error ifadd_outputwould
overwrite an existing attribute. (#1611)Theencodersandeval_pointsofEnsembleare now sampled fromScatteredHypersphereby default. (#1611)Trying to re-open a closed Simulator will now raise an error. (#1599)DeprecatedNeuronType.stepreplaces theNeuronType.step_mathmethod,
which will be removed in Nengo 4.0.0. (#1609)Connection.is_decodedis deprecated, as the definition of whether a Connection
is decoded or not was ambiguous. Instead we recommend directly checking the pre/post
objects for the properties of interest. (#1640)FixedFixed a bug when comparing equality withEnsemble.neuronsorConnection.learning_ruleobjects.
(#1588)Fixed a bug preventing unpickling anEnsemble.
(#1598)Fixed a bug in which unpickling aSimulatorwould rerun the optimizer.
(#1598)Fixed a bug where theLstsqDropsolver errored when solving for zero weights.
(#1541,#1607)Fixed a bug in the validation ofChoicedistributions. (#1630)Fixed a bug where aSignaldid not register as sharing memory with itself.
(#1627)Fixed a shape error when applying PES learning to a neuron-to-neuron connection with a
slice on the post-synaptic neurons. (#1640)Fixed a shape error when applying PES learning to a neuron->ensemble connection with
a weight solver. (#1640)Fixed a shape error when applying PES learning to an ensemble->neuron connection.
(#1640)Fixed a shape error when applying PES learning with a slice on the pre-synaptic
object. (#1640)3.0.0 (November 18, 2019)AddedAdded progress bar support for Jupyter Lab >=0.32.
(#1428,#1087)We now warn that the progress bar is not supported in Jupyter Notebook <5.
(#1428,#1426)Added support for convolutional connections.
(#1481)Added version tracking to documentation, so that documentation from old
versions remains available.
(#1488)Added support for sparse connections.
(#1532)Added afail_fastsetting to test operators when they are first
added to the model. Seeconfiguration optionsfor details. (#1532)Added a--memoryoption for pytest that prints the total memory
consumed by the tests when they complete (Linux and Mac OS X only).
(#640)Added a bit precision setting to change the number of bits allocated
to each value tracked by Nengo.
(#640)Added aSimulator.clear_probesmethod to clear probe data.
This method can be used before pickling to reduce the pickle file size.
(#1387)Nengo tests now use theallclosefixture frompytest-allclose,
which makes it possible for backends to change test tolerances.
(#1563)Nengo tests now use therngandseedfixtures frompytest-rng.
(#1566)Nengo tests now use thepltfixture frompytest-plt.
(#1566)Added anengo_simloaderpytest option for specifying a callable that
takes a pytestrequestand returns a callable to be used
asSimulatorin the Nengo test suite.
(#1566)Added more content to the API reference documentation.
(#1578)ChangedPython 2 is no longer supported. The oldest supported Python version is 3.5.
(#1520,python3statement.org)Nengo no longer supports Python 3.4.
Official 3.4 support ended in March 2019.
(PEP-429,#1514)Replaced thedtargument toSimulator.trangewithsample_everybecausedtwould return values that the simulator had not simulated.dtis now an alias forsample_everyand will be removed in the future.
(#1368,#1384)Dense connection transforms (this includes all previously supported values
forConnection.transform) will now be represented internally asnengo.Denseobjects. Arrays/scalars can still be passed astransformvalues, and they will be automatically converted to the equivalentnengo.Denseobject. Retrieving the value ofmy_conn.transformwill
return thatDenseobject. The original input array can be retrieved
throughmy_conn.transform.init.
(#1481)nengo.solvers.NoSolver(w, weights=True)now expectswto have shape(pre.n_neurons, function_d),
rather thanpre.n_neurons, post.n_neurons). That is, withNoSolveryou are always specifying the values for the decoders, and encoders/transform
will be applied automatically to those decoders (as occurs with
all other solvers). Note that this does not affectNoSolver(...,weights=False)(the default).
(#1481)Increased minimum NumPy version to 1.11.0. See ourinstructions for installing NumPyif you need to upgrade.
(#1481)Solvers are now explicitly marked as compositional or non-compositional
depending on whether they must act on full connection weight matrices
when solving for weights.
(#1507)Solvers no longer take encoders as an argument. Instead, encoders will
be applied to the targets before the solve function for non-compositional
solvers and applied by the Transform builder for compositional solvers.
(#1507)Example Jupyter notebooks have been upgraded to notebook format 4.
(#1440)Switched documentation to newnengo-sphinx-theme.
(#1489)Thesettled_firingratefunction has been moved fromnengo.utils.neuronstonengo.neurons.
(#1187)Added new pytest config option,nengo_test_unsupported(replacing the
previousSimulator.unsupportedfunctionality).
(#1521)Switched to nengo-bones templating system for TravisCI config/scripts.
(#1514)TheNeuronType.currentandNeuronType.ratesmethods now document
the supported shapes of parameters and return values.
(#1437)PES learning updates are now applied on the next timestep rather than
the current one.
(#1398)TheNdarrayParamnow accepts adtypeargument to check that
data assigned to that parameter matches the given Numpydtype.DistOrArrayParamaccepts an analogoussample_dtypeargument.
(#1532)We no longer test operators when they are initially added to the model,
which speed up build times slightly. To re-enable this testing,
enable thefail_fastRC setting.
(#1532)LinearFilternow uses state space representations internally,
which is faster and potentially more accurate.
(#1535)The default value ofy0inSynapse.filtis now 0 instead of
the initial value of the input signal. This allows unstable filters
(e.g., integrators) to be used withfilt.
(#1535)LinearFilternow accepts the discretization method as an argument,
rather than having it specified inmake_step.
(#1535)Thesynapse_kwargsargument toFilteredNoisehas been removed.
(#1535)Processes with internal state now declare that state by defining amake_statemethod and accepting astateparameter inmake_step.
(#1387)Simulatoris now pickleable, allowing its state to be saved and loaded.
(#1387)Renamedutils.testing.allclosetoutils.testing.signals_allclose,
to differentiate it from theallclosefixture.
(#1563)The defaultinterceptsvalue has been changed toUniform(-1,0.9)to avoid high gains when intercepts are close to 1.
(#1534,#1561)The--simulatorand--neuronspytest command line arguments are now specified
bynengo_simulatorandnengo_neuronsentries in the pytest config file
instead.
(#1566)Thenengo_test_unsupportedoption now uses pytest nodeids for the test names
(the main change is that this means a double::between file and function names).
(#1566)Signalswill now raise an error if their initial value contains NaNs.
(#1571)The builder will now raise an error if any encoders are NaN,
which can occur if an encoder has length zero.
(#1571)Renamedsimulator.ProbeDicttosimulator.SimulationData.
(#1574)Increased minimum numpy version to 1.13.
(#1577)Documentation pages that had underscores in their filenames have been
renamed to have hyphens instead.
(#1585)DeprecatedDeprecated thenengo.spamodule. Use theNengo SPAproject instead.
(#1465)TheAandBinputs to theProductandCircularConvolutionnetworks are officially deprecated. Useinput_aandinput_binstead.
(#887,#1179)nengo.utils.compatwill be removed in the next minor release.
(#1520)Deprecatedutils.numpy.rmse. Callutils.numpy.rmson
the difference between two arrays instead.
(#1563)RemovedNetworks no longer accept thenetargument. To set network arguments
likelabel, pass them as keyword arguments instead.
(#1179)Removedgenerate_graphvizutility function. It can now be found innengo_extras.
(#1187)Removed functions for estimating firing rates from spikes. They can now
be found innengo_extras.
(#1187)Removed theprobe_allfunction. It can now be found innengo_extras.
(#1187)PES.correctionis no longer probeable.
(#1398)The internalrngandseedfixtures have been removed. Use the
externalpytest-rngpackage instead.
(#1566)The internalpltfixture has been removed. Use the
externalpytest-pltpackage instead.
(#1566)The internalloggerfixture has been removed. Use pytest’slog capturinginstead. (#1566)Removednengo.logandnengo.utils.logging. Use the standard Python
and pytest logging modules instead.
(#1566)The internalanalyticsandanalytics_datafixtures have been removed.
Use pytest’scache fixtureinstead. (#1566)TheRefSimulatorfixture has been removed. Use theSimulatorfixture
and thenengo_test_unsupportedconfiguration option instead.
(#1566)Removedfind_modulesandload_functionsfromnengo.utils.testing.
Backends wanting to run Nengo test should usepytest--pyargsnengoinstead.
(#1566)Removednengo.tests.options.  It is no longer necessary to use-pnengo.tests.optionswhen running Nengo tests.
(#1566)Removednengo.conftest. Use pytest configuration options instead.
(#1566)Removed support for legacy cache files.
(#1577)Removed the nengo ipynb progress bar extension. This is no longer needed in more
recent ipynb versions.
(#1577)Removed the deprecated*_tau(e.g.pre_tau) parameters from learning rules.
Use*_synapseinstead.
(#1577)Removed the deprecatedneuron_nodesargument fromnetworks.EnsembleArray.
UseEnsembleArray.add_neuron_input/add_neuron_outputinstead.
(#1577)Removed the deprecatedprogress.updaterconfig option.
Useprogress.progress_barinstead.
(#1577)Removed the deprecatednengo.synapses.filt/filtfiltfunctions.
Use theSynapse.filt/filtfiltmethods instead.
(#1577)Removed the Python 2 compatibility code fromutils.compat.
(#1577)Removedutils.connection.target_function. Target points can be passed
directly to theConnection.functionargument instead.
(#1577)Removedutils.functions.piecewise. Usenengo.processes.Piecewiseinstead.
(#1577)Removedutils.testing.Mock.
(#1578)FixedFrozenObjectscan control parameter initialization order when copying,
which fixed a bug encountered when copying convolutional connections.
(#1493)Fixed an issue in which reshaped signals were not having their offset
values preserved, causing issues with some node functions.
(#1474)Better error message when Node output function does not match the
givensize_in/size_out.
(#1452,#1434)Several objects had elements missing from their string representations.
These strings are now automatically generated and tested to be complete.
(#1472)Fixed the progress bar in recent Jupyter Lab versions.
(#1499,#1500)Some higher-orderLinearFiltersynapses had unnecessary delays
that have now been removed.
(#1535)Models using theSpikingRectifiedLinearneuron type now have their
decoders cached. (#1550)OptionalShapeParam/TupleParamcan now be set toNone.
(#1569)Fixed error when using advanced indexing to connect to anEnsemble.neuronsobject.
(#1582,#1583)2.8.0 (June 9, 2018)AddedAdded a warning when settinggainandbiasalong with either ofmax_ratesorintercepts, as the latter two parameters are ignored.
(#1431,#1433)ChangedLearning rules can now be sliced when providing error input.
(#1365,#1385)The order of parameters in learning rules has changed such thatlearning_ratealways comes first.
(#1095)Learning rules takepre_synapse,post_synapse, andtheta_synapseinstead ofpre_tau,post_tau, andtheta_taurespectively.
This allows arbitrarySynapseobjects to be used as filters on
learning signals.
(#1095)DeprecatedThenengo.ipynbIPython extension and theIPython2ProgressBarhave been deprecated and replaced by theIPython5ProgressBar.
This progress bar will be automatically activated in IPython and
Jupyter notebooks from IPython version 5.0 onwards.
(#1087,#1375)Thepre_tau,post_tau, andtheta_tauparameters
for learning rules are deprecated. Instead, usepre_synapse,post_synapse, andtheta_synapserespectively.
(#1095)RemovedRemovednengo.utils.docutilsin favor of usingnbsphinx.
(#1349)2.7.0 (March 7, 2018)AddedAddedamplitudeparameter toLIF,LIFRate,
andRectifiedLinearwhich scale the output amplitude.
(#1325,#1391)Added theSpikingRectifiedLinearneuron model.
(#1391)ChangedDefault values can no longer be set forEnsemble.n_neuronsorEnsemble.dimensions.
(#1372)If the simulator seed is not specified, it will now be set
from the network seed if a network seed is specified.
(#980,#1386)FixedFixed an issue in which signals could not be pickled,
making it impossible to pickleModelinstances.
(#1135)Better error message for invalid return values innengo.Nodefunctions.
(#1317)Fixed an issue in which accepting and passing(*args, **kwargs)could not be used in custom solvers.
(#1358,#1359)Fixed an issue in which the cache would not release its index lock
on abnormal termination of the Nengo process.
(#1364)Fixed validation checks that prevented the default
from being set on certain parameters.
(#1372)Fixed an issue with repeated elements in slices in which
a positive and negative index referred to the same dimension.
(#1395)TheSimulator.n_stepsandSimulator.timeproperties
now return scalars, as was stated in the documentation.
(#1406)Fixed the--seed-offsetoption of the test suite.
(#1409)2.6.0 (October 6, 2017)AddedAdded aNoSolversolver that can be used to manually pass in
a predefined set of decoders or weights to a connection.
(#1352)Added aPiecewiseprocess, which replaces the now deprecatedpiecewisefunction.
(#1036,#1100,#1355,#1362)ChangedThe minimum required version of NumPy has been raised to 1.8.
(#947)Learning rules can now have a learning rate of 0.
(#1356)Running the simulator for zero timesteps will now issue a warning,
and running for negative time will error.
(#1354,#1357)FixedFixed an issue in which the PES learning rule could not be used
on connections to anObjViewwhen using a weight solver.
(#1317)The progress bar that can appear when building a large model
will now appear earlier in the build process.
(#1340)Fixed an issue in whichShapeParamwould always storeNone.
(#1342)Fixed an issue in which multiple identical indices in a slice were ignored.
(#947,#1361)DeprecatedThepiecewisefunction innengo.utils.functionshas been deprecated.
Please use thePiecewiseprocess instead.
(#1100)2.5.0 (July 24, 2017)AddedAdded an_neuronsproperty toNetwork, which gives the
number of neurons in the network, including all subnetworks.
(#435,#1186)Added a new example showing how adjusting ensemble tuning curves can
improve function approximation.
(#1129)Added a minimum magnitude option toUniformHypersphere.
(#799)Added documentation on RC settings.
(#1130)Added documentation on improving performance.
(#1119,#1130)AddedLinearFilter.combinemethod to
combine twoLinearFilterinstances.
(#1312)Added a method to all neuron types to compute ensemblemax_ratesandinterceptsgivengainandbias.
(#1334)ChangedLearning rules now have asize_inparameter and attribute,
allowing both integers and strings to define the dimensionality
of the learning rule. This replaces theerror_typeattribute.
(#1307,#1310)EnsembleArray.n_neuronsnow gives the total number of neurons
in all ensembles, including those in subnetworks.
To get the number of neurons in each ensemble,
useEnsembleArray.n_neurons_per_ensemble.
(#1186)TheNengo modelling API documentnow has summaries to help navigate the page.
(#1304)The error raised when aConnectionfunction returnsNoneis now more clear.
(#1319)We now raise an error when aConnectiontransform is set toNone.
(#1326)FixedProbe cache is now cleared on simulator reset.
(#1324)Neural gains are now always applied after the synapse model.
Previously, this was the case for decoded connections
but not neuron-to-neuron connections.
(#1330)Fixed a crash when a lock cannot be acquired while shrinking the cache.
(#1335,#1336)2.4.0 (April 18, 2017)AddedAdded an optimizer that reduces simulation time for common types of models.
The optimizer can be turned off by passingoptimize=FalsetoSimulator.
(#1035)Added the option to not normalize encoders by settingEnsemble.normalize_encoderstoFalse.
(#1191,#1267)Added theSamplesdistribution to allow raw NumPy arrays
to be passed in situations where a distribution is required.
(#1233)ChangedWe now raise an error when an ensemble is assigned a negative gain.
This can occur when solving for gains with intercepts greater than 1.
(#1212,#1231,#1248)We now raise an error when aNodeorDirectensemble
produces a non-finite value.
(#1178,#1280,#1286)We now enforce that thelabelof a network must be a string orNone,
and that theseedof a network must be an int orNone.
This helps avoid situations where the seed would mistakenly
be passed as the label.
(#1277,#1275)It is now possible to pass NumPy arrays in theens_kwargsargument ofEnsembleArray. Arrays are wrapped in aSamplesdistribution internally.
(#691,#766,#1233)The default refractory period (tau_ref) for theSigmoidneuron type
has changed to 2.5 ms (from 2 ms) for better compatibility with the
default maximum firing rates of 200-400 Hz.
(#1248)Inputs to theProductandCircularConvolutionnetworks have been
renamed fromAandBtoinput_aandinput_bfor consistency.
The old names are still available, but should be considered deprecated.
(#887,#1296)FixedProperly handle non C-contiguous node outputs.
(#1184,#1185)DeprecatedThenetargument to networks has been deprecated. This argument existed
so that network components could be added to an existing network instead of
constructing a new network. However, this feature is rarely used,
and makes the code more complicated for complex networks.
(#1296)2.3.1 (February 18, 2017)AddedAdded documentation on config system quirks.
(#1224)Addednengo.utils.network.activate_direct_modefunction to make it
easier to activate direct mode in networks where some parts require neurons.
(#1111,#1168)FixedThe matrix multiplication example will now work with matrices of any size
and uses the product network for clarity.
(#1159)Fixed instances in which passing a callable class as a function could fail.
(#1245)Fixed an issue in which probing some attributes would be one timestep
faster than other attributes.
(#1234,#1245)Fixed an issue in which SPA models could not be copied.
(#1266,#1271)Fixed an issue in which Nengo would crash if other programs
had locks on Nengo cache files in Windows.
(#1200,#1235)ChangedInteger indexing of Nengo objects out of range raises anIndexErrornow to be consistent with standard Python behaviour.
(#1176,#1183)Documentation that applies to all Nengo projects has been moved tohttps://www.nengo.ai/.
(#1251)2.3.0 (November 30, 2016)AddedIt is now possible to probescaled_encoderson ensembles.
(#1167,#1117)Addedcopymethod to Nengo objects. Nengo objects can now be pickled.
(#977,#984)A progress bar now tracks the build process
in the terminal and Jupyter notebook.
(#937,#1151)Addednengo.dists.get_samplesfunction for convenience
when working with distributions or samples.
(#1181,docs)ChangedAccess to probe data vianengo.Simulator.datais now cached,
making repeated access much faster.
(#1076,#1175)DeprecatedAccess tonengo.Simulator.modelis deprecated. To access static data
generated during the build usenengo.Simulator.data. It provides access
to everything thatnengo.Simulator.model.paramsused to provide access to
and is the canonical way to access this data across different backends.
(#1145,#1173)2.2.0 (September 12, 2016)API changesIt is now possible to pass a NumPy array to thefunctionargument
ofnengo.Connection. The values in the array are taken to be the
targets in the decoder solving process, which means that theeval_pointsmust also be set on the connection.
(#1010)nengo.utils.connection.target_functionis now deprecated, and will
be removed in Nengo 3.0. Instead, pass the targets directly to the
connection through thefunctionargument.
(#1010)Behavioural changesDropped support for NumPy 1.6. Oldest supported NumPy version is now 1.7.
(#1147)ImprovementsAdded anengo.backendsentry point to make the reference simulator
discoverable for other Python packages. In the future all backends should
declare an entry point accordingly.
(#1127)AddedShapeParamto store array shapes.
(#1045)AddedThresholdingPresetto configure ensembles for thresholding.
(#1058,#1077,#1148)Tweakedrasterplotso that spikes from different neurons don’t overlap.
(#1121)DocumentationAdded a page explaining the config system and preset configs.
(#1150)Bug fixesFixed some situations where the cache index becomes corrupt by
writing the updated cache index atomically (in most cases).
(#1097,#1107)The synapse methodsfiltandfiltfiltnow support lists as input.
(#1123)Added a registry system so that only stable objects are cached.
(#1054,#1068)Nodes now support array views as input.
(#1156,#1157)2.1.2 (June 27, 2016)Bug fixesThe DecoderCache is now more robust when used improperly, and no longer
requires changes to backends in order to use properly.
(#1112)2.1.1 (June 24, 2016)ImprovementsImproved the defaultLIFneuron model to spike at the same rate as theLIFRateneuron model for constant inputs. The older model has been
moved tonengo_extrasunder the nameFastLIF.
(#975)Addedy0attribute toWhiteSignal, which adjusts the phase of each
dimension to begin with absolute value closest toy0.
(#1064)Allow theAssociativeMemoryto accept Semantic Pointer expressions asinput_keysandoutput_keys.
(#982)Bug fixesThe DecoderCache is used as context manager instead of relying on the__del__method for cleanup. This should solve problems with the
cache’s file lock not being removed. It might be necessary to
manually remove theindex.lockfile in the cache directory after
upgrading from an older Nengo version.
(#1053,#1041,#1048)If the cache index is corrupted, we now fail gracefully by invalidating
the cache and continuing rather than raising an exception.
(#1110,#1097)TheNnlssolver now works for weights. TheNnlsL2solver is
improved since we clip values to be non-negative before forming
the Gram system.
(#1027,#1019)Eliminate memory leak in the parameter system.
(#1089,#1090)Allow recurrence of the forma=b, b=ain basal ganglia SPA actions.
(#1098,#1099)Support a greater range of Jupyter notebook and ipywidgets versions with the
theipynbextensions.
(#1088,#1085)2.1.0 (April 27, 2016)API changesA new class for representing stateful functions calledProcesshas been added.Nodeobjects are now process-aware, meaning that
a process can be used as a node’soutput. Unlike non-process
callables, processes are properly reset when a simulator is reset.
See theprocesses.ipynbexample notebook, or the API documentation
for more details.
(#590,#652,#945,#955)SpikingLIFneuron models now accept an additional argument,min_voltage. Voltages are clipped such that they do not drop below
this value (previously, this was fixed at 0).
(#666)ThePESlearning rule no longer accepts a connection as an argument.
Instead, error information is transmitted by making a connection to the
learning rule object (e.g.,nengo.Connection(error_ensemble, connection.learning_rule).
(#344,#642)Themodulatoryattribute has been removed fromnengo.Connection.
This was only used for learning rules to this point, and has been removed
in favor of connecting directly to the learning rule.
(#642)Connection weights can now be probed withnengo.Probe(conn, 'weights'),
and these are always the weights that will change with learning
regardless of the type of connection. Previously, eitherdecodersortransformmay have changed depending on the type of connection;
it is now no longer possible to probedecodersortransform.
(#729)A version of the AssociativeMemory SPA module is now available as a
stand-alone network innengo.networks. The AssociativeMemory SPA module
also has an updated argument list.
(#702)TheProductandInputGatedMemorynetworks no longer accept aconfigargument. (#814)TheEnsembleArraynetwork’sneuron_nodesargument is deprecated.
Instead, call the newadd_neuron_inputoradd_neuron_outputmethods.
(#868)Thenengo.logutility function now takes a stringlevelparameter
to specify any logging level, instead of the old binarydebugparameter.
Cache messages are logged at DEBUG instead of INFO level.
(#883)Reorganised the Associative Memory code, including removing many extra
parameters fromnengo.networks.assoc_mem.AssociativeMemoryand modifying
the defaults of others.
(#797)Addclosemethod toSimulator.Simulatorcan now be used
used as a context manager.
(#857,#739,#859)Most exceptions that Nengo can raise are now custom exception classes
that can be found in thenengo.exceptionsmodule.
(#781)All Nengo objects (Connection,Ensemble,Node, andProbe)
now accept alabelandseedargument if they didn’t previously.
(#958)Innengo.synapses,filtandfiltfiltare deprecated. Every
synapse type now hasfiltandfiltfiltmethods that filter
using the synapse.
(#945)Connectionobjects can now accept aDistributionfor the transform
argument; the transform matrix will be sampled from that distribution
when the model is built.
(#979).Behavioural changesThe sign on thePESlearning rule’s error has been flipped to conform
with most learning rules, in which error is minimized. The error should beactual - target. (#642)ThePESrule’s learning rate is invariant to the number of neurons
in the presynaptic population. The effective speed of learning should now
be unaffected by changes in the size of the presynaptic population.
Existing learning networks may need to be updated; to achieve identical
behavior, scale the learning rate bypre.n_neurons / 100.
(#643)Theprobeableattribute of all Nengo objects is now implemented
as a property, rather than a configurable parameter.
(#671)Node functions receivexas a copied NumPy array (instead of a readonly
view).
(#716,#722)The SPA Compare module produces a scalar output (instead of a specific
vector).
(#775,#782)Bias nodes inspa.Cortical, and gate ensembles and connections inspa.Thalamusare now stored in the target modules.
(#894,#906)Thefiltandfiltfiltfunctions onSynapsenow use the initial
value of the input signal to initialize the filter output by default. This
provides more accurate filtering at the beginning of the signal, for signals
that do not start at zero.
(#945)ImprovementsAddedEnsemble.noiseattribute, which injects noise directly into
neurons according to a stochasticProcess.
(#590)Added arandomized_svdsubsolver for the L2 solvers. This can be much
quicker for large numbers of neurons or evaluation points.
(#803)AddedPES.pre_tauattribute, which sets the time constant on a lowpass
filter of the presynaptic activity.
(#643)EnsembleArray.add_outputnow accepts a list of functions
to be computed by each ensemble.
(#562,#580)LinearFilternow has ananalogargument which can be set
through its constructor. Linear filters with digital coefficients
can be specified by settinganalogtoFalse.
(#819)AddedSqrtBetadistribution, which describes the distribution
of semantic pointer elements.
(#414,#430)AddedTrianglesynapse, which filters with a triangular FIR filter.
(#660)Addedutils.connection.eval_point_decodingfunction, which
provides a connection’s static decoding of a list of evaluation points.
(#700)Resetting the Simulator now resets all Processes, meaning the
injected random signals and noise are identical between runs,
unless the seed is changed (which can be done throughSimulator.reset).
(#582,#616,#652)An exception is raised if SPA modules are not properly assigned to an SPA
attribute.
(#730,#791)TheProductnetwork is now more accurate.
(#651)Numpy arrays can now be used as indices for slicing objects.
(#754)Config.configuresnow accepts multiple classes rather than
just one. (#842)Addedaddmethod tospa.Actions, which allows
actions to be added after module has been initialized.
(#861,#862)Added SPA wrapper for circular convolution networks,spa.Bind(#849)Added theVoja(Vector Oja) learning rule type, which updates an
ensemble’s encoders to fire selectively for its inputs. (seeexamples/learning/learn_associations.ipynb).
(#727)Added a clipped exponential distribution useful for thresholding, in
particular in the AssociativeMemory.
(#779)Added a cosine similarity distribution, which is the distribution of the
cosine of the angle between two random vectors. It is useful for setting
intercepts, in particular when using theVojalearning rule.
(#768)nengo.synapses.LinearFilternow has anevaluatemethod to
evaluate the filter response to sine waves of given frequencies. This can
be used to create Bode plots, for example.
(#945)nengo.spa.Vocabularyobjects now have areadonlyattribute that
can be used to disallow adding new semantic pointers. Vocabulary subsets
are read-only by default.
(#699)Improved performance of the decoder cache by writing all decoders
of a network into a single file.
(#946)Bug fixesFixed issue where settingConnection.seedthrough the constructor had
no effect. (#724)Fixed issue in which learning connections could not be sliced.
(#632)Fixed issue when probing scalar transforms.
(#667,#671)Fix for SPA actions that route to a module with multiple inputs.
(#714)Corrected thermsesvalues inBuiltConnection.solver_infowhen usingNNlsandNnl2sL2solvers, and theregargument forNnl2sL2.
(#839)spa.Vocabulary.create_pointernow respects the specified number of
creation attempts, and returns the most dissimilar pointer if none can be
found below the similarity threshold.
(#817)Probing a Connection’s output now returns the output of that individual
Connection, rather than the input to the Connection’s post Ensemble.
(#973,#974)Fixed thread-safety of using networks and config inwithstatements.
(#989)The decoder cache will only be used when a seed is specified.
(#946)2.0.4 (April 27, 2016)Bug fixesCache now fails gracefully if thelegacy.txtfile cannot be read.
This can occur if a later version of Nengo is used.2.0.3 (December 7, 2015)API changesThespa.Stateobject replaces the oldspa.Memoryandspa.Buffer.
These old modules are deprecated and will be removed in 2.2.
(#796)2.0.2 (October 13, 2015)2.0.2 is a bug fix release to ensure that Nengo continues
to work with more recent versions of Jupyter
(formerly known as the IPython notebook).Behavioural changesThe IPython notebook progress bar has to be activated with%load_ext nengo.ipynb.
(#693)ImprovementsAdded[progress]section tonengorcwhich allows settingprogress_barandupdater.
(#693)Bug fixesFix compatibility issues with newer versions of IPython,
and Jupyter. (#693)2.0.1 (January 27, 2015)Behavioural changesNode functions receivetas a float (instead of a NumPy scalar)
andxas a readonly NumPy array (instead of a writeable array).
(#626,#628)Improvementsrasterplotworks with 0 neurons, and generates much smaller PDFs.
(#601)Bug fixesFix compatibility with NumPy 1.6.
(#627)2.0.0 (January 15, 2015)Initial release of Nengo 2.0!
Supports Python 2.6+ and 3.3+.
Thanks to all of the contributors for making this possible!