99f6a9b9b366e20ebc300fc5be904308c17c484f,src/spn/experiments/RandomSPNs_layerwise/rat_spn.py,RatSpn,forward,#RatSpn#Any#,284
Before Change
def forward(self, x: torch.Tensor):
Computes the class conditional distributions P(X | C) for each class.
// Go over all regions
split_results = []
for spn in self.region_spns:
split_results.append(spn(x).squeeze(1))
x = torch.stack(split_results, dim=1)
// Merge results from the different SPN into the channel dimension
x = x.view(x.shape[0], 1, -1)
After Change
x = self._forward_layers(x)
// Merge results from the different repetitions into the channel dimension
n, d, c, r = x.size()
assert d == 1 // number of features should be 1 at this point
x = x.view(n, d, c * r, 1)
// Apply C sum node outputs
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances Project Name: SPFlow/SPFlow
Commit Name: 99f6a9b9b366e20ebc300fc5be904308c17c484f
Time: 2020-04-01
Author: steven.lang.mz@gmail.com
File Name: src/spn/experiments/RandomSPNs_layerwise/rat_spn.py
Class Name: RatSpn
Method Name: forward
Project Name: SenticNet/conv-emotion
Commit Name: 87d57a3d34a1eef2c6ad5519741710e3321f136c
Time: 2019-03-19
Author: 40890991+soujanyaporia@users.noreply.github.com
File Name: DialogueRNN/model.py
Class Name: BiE2EModel
Method Name: forward
Project Name: ixaxaar/pytorch-dnc
Commit Name: 2026a8939d9ccc3e26ac776db5b4788846fd166c
Time: 2017-12-03
Author: root@ixaxaar.in
File Name: dnc/sparse_memory.py
Class Name: SparseMemory
Method Name: read_from_sparse_memory