54ad58d10cb8a0d96507e075cdc26730b9e86e7f,bindsnet/learning/__init__.py,MSTDP,_connection_update,#MSTDP#,390

Before Change


        reward = kwargs["reward"]
        a_plus = torch.tensor(kwargs.get("a_plus", 1.0))
        a_minus = torch.tensor(kwargs.get("a_minus", -1.0))
        tc_plus = torch.tensor(kwargs.get("tc_plus", 20.0))
        tc_minus = torch.tensor(kwargs.get("tc_minus", 20.0))

        // Compute weight update based on the point eligibility value of the past timestep.
        self.connection.w += self.nu[0] * reward * self.eligibility

After Change


        if not hasattr(self, "p_plus"):
            self.p_plus = torch.zeros(self.source.n)
        if not hasattr(self, "p_minus"):
            self.p_minus = torch.zeros(self.target.n)
        if not hasattr(self, "eligibility"):
            self.eligibility = torch.zeros(*self.connection.w.shape)

        // Reshape pre- and post-synaptic spikes.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: BindsNET/bindsnet
Commit Name: 54ad58d10cb8a0d96507e075cdc26730b9e86e7f
Time: 2019-04-01
Author: danjsaund@gmail.com
File Name: bindsnet/learning/__init__.py
Class Name: MSTDP
Method Name: _connection_update


Project Name: mariogeiger/se3cnn
Commit Name: b1369e0387b7430b2b0222c2346a8b9a48973eb1
Time: 2018-10-18
Author: michal.tyszkiewicz@gmail.com
File Name: se3cnn/kernel.py
Class Name: SE3Kernel
Method Name: combination


Project Name: rtqichen/torchdiffeq
Commit Name: 71ecdbadb8a5712966535dd6bfe843f78ac1db91
Time: 2020-07-25
Author: 33688385+patrick-kidger@users.noreply.github.com
File Name: torchdiffeq/_impl/adjoint.py
Class Name: OdeintAdjointMethod
Method Name: backward


Project Name: rusty1s/pytorch_geometric
Commit Name: b2002a8ef80ecbecee09fd61b910c987648455c7
Time: 2020-08-26
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/datasets/karate.py
Class Name: KarateClub
Method Name: __init__