Skip to content

Commit

Permalink
Merge pull request #228 from Hananel-Hazan/dan
Browse files Browse the repository at this point in the history
Doc-string fixes.
  • Loading branch information
Hananel-Hazan committed Apr 9, 2019
2 parents c0fab38 + daa3892 commit 86dad62
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bindsnet/network/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def load(file_name: str, map_location: str = 'cpu', learning: bool = None) -> 'N
class Network:
# language=rst
"""
Most important object of the :code:`bindsnet` package. Responsible for the simulation and interaction of nodes and
connections.
Expand Down Expand Up @@ -62,7 +61,7 @@ class Network:
network.add_monitor(monitor=M2, name='Y')
# Create Poisson-distributed spike train inputs.
data = 15 * torch.rand(1, 100) # Generate random Poisson rates for 100 input neurons.
data = 15 * torch.rand(100) # Generate random Poisson rates for 100 input neurons.
train = encoding.poisson(datum=data, time=5000) # Encode input as 5000ms Poisson spike trains.
# Simulate network on generated spike trains.
Expand Down Expand Up @@ -173,6 +172,8 @@ def clone(self) -> 'Network':
# language=rst
"""
Returns a cloned network object.
:return: A copy of this network.
"""
virtual_file = tempfile.SpooledTemporaryFile()
torch.save(self, virtual_file)
Expand Down

0 comments on commit 86dad62

Please sign in to comment.