8aee625101865785adbf208b9a99f16474cca98f,dnc/sparse_memory.py,SparseMemory,reset,#SparseMemory#Any#Any#Any#,78

Before Change


      hidden["precedence"] = hidden["precedence"].clone()
      hidden["read_weights"] = hidden["read_weights"].clone()
      hidden["write_weights"] = hidden["write_weights"].clone()
      hidden["usage_vector"] = hidden["usage_vector"].clone()

      if erase:
        hidden = self.rebuild_indexes(hidden)

After Change


      hidden["write_weights"] = hidden["write_weights"].clone()

      if erase:
        hidden = self.rebuild_indexes(hidden)
        hidden["sparse"].fill(0)
        // hidden["memory"].data.fill_(δ)
        hidden["read_weights"].data.fill_(δ)
        hidden["write_weights"].data.fill_(δ)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: ixaxaar/pytorch-dnc
Commit Name: 8aee625101865785adbf208b9a99f16474cca98f
Time: 2017-11-27
Author: root@ixaxaar.in
File Name: dnc/sparse_memory.py
Class Name: SparseMemory
Method Name: reset


Project Name: ixaxaar/pytorch-dnc
Commit Name: c4ec88a58eaa0f74f18ffc25c921e212a15b3737
Time: 2017-11-26
Author: root@ixaxaar.in
File Name: dnc/sparse_memory.py
Class Name: SparseMemory
Method Name: reset


Project Name: ixaxaar/pytorch-dnc
Commit Name: d7f916627aca77365beadc2c7c1af6504f445249
Time: 2017-11-30
Author: root@ixaxaar.in
File Name: dnc/sparse_memory.py
Class Name: SparseMemory
Method Name: reset