From 52c44fb2638c60a82d76e010ef49a5a06fd78b5f Mon Sep 17 00:00:00 2001 From: atenagm1375 Date: Sat, 3 Apr 2021 09:52:49 +0430 Subject: [PATCH] minor changes in doc --- cnsproject/encoding/encoders.py | 4 ++-- cnsproject/network/connections.py | 3 +-- cnsproject/network/network.py | 7 +++++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/cnsproject/encoding/encoders.py b/cnsproject/encoding/encoders.py index 07f1344..146f94a 100644 --- a/cnsproject/encoding/encoders.py +++ b/cnsproject/encoding/encoders.py @@ -28,9 +28,9 @@ class AbstractEncoder(ABC): time : int Length of encoded tensor. dt : float, Optional - Simulation timestep. The default is 1.0. + Simulation time step. The default is 1.0. device : str, Optional - The device to do the comutations. The default is "cpu". + The device to do the computations. The default is "cpu". """ diff --git a/cnsproject/network/connections.py b/cnsproject/network/connections.py index 593c254..c9e1261 100644 --- a/cnsproject/network/connections.py +++ b/cnsproject/network/connections.py @@ -8,7 +8,6 @@ import torch from .neural_populations import NeuralPopulation -# from ..learning.learning_rules import LearningRule, NoOp class AbstractConnection(ABC, torch.nn.Module): @@ -121,7 +120,7 @@ def compute(self, s: torch.Tensor) -> None: @abstractmethod def update(self, **kwargs) -> None: """ - Compute connection's learning rule. + Compute connection's learning rule and weight update. Keyword Arguments ----------------- diff --git a/cnsproject/network/network.py b/cnsproject/network/network.py index 34b2f2f..1273261 100644 --- a/cnsproject/network/network.py +++ b/cnsproject/network/network.py @@ -79,6 +79,9 @@ def __init__( self.train(learning) + # Make sure that arguments of your reward and decision classes do not + # share same names. Their arguments are passed to the network as its + # keyword arguments. self.reward = reward(**kwargs) self.decision = decision(**kwargs) @@ -201,8 +204,8 @@ def run( Mapping of connection names to boolean masks of the weights to clamp to zero. - Note: you can pass the reward and decision arguments as keyword\ - argumeents to this function. + **Note:** you can pass the reward and decision methods' arguments as keyword\ + arguments to this function. Returns -------