c4ec88a58eaa0f74f18ffc25c921e212a15b3737,dnc/sparse_memory.py,SparseMemory,reset,#SparseMemory#Any#Any#Any#,54

Before Change



    if hidden is None:
      return {
          "memory": cuda(T.zeros(b, m, w).fill_(δ), gpu_id=self.gpu_id),
          "link_matrix": cuda(T.zeros(b, 1, m, m), gpu_id=self.gpu_id),
          "precedence": cuda(T.zeros(b, 1, m), gpu_id=self.gpu_id),
          "read_weights": cuda(T.zeros(b, r, m).fill_(δ), gpu_id=self.gpu_id),

After Change


          "usage_vector": cuda(T.zeros(b, m), gpu_id=self.gpu_id)
      }
      // Build FLANN randomized k-d tree indexes for each batch
      hx = rebuild_indexes(hx)
    else:
      // hidden["memory"] = hidden["memory"].clone()
      hidden["link_matrix"] = hidden["link_matrix"].clone()
      hidden["precedence"] = hidden["precedence"].clone()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


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: 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: d7f916627aca77365beadc2c7c1af6504f445249
Time: 2017-11-30
Author: root@ixaxaar.in
File Name: dnc/sparse_memory.py
Class Name: SparseMemory
Method Name: reset