a277fd89980f7a4647d0a17548aba7df37a5aefb,pyprob/nn/inference_network_feedforward.py,InferenceNetworkFeedForward,_embed_observe,#InferenceNetworkFeedForward#Any#,154
Before Change
def _embed_observe(self, observe=None):
if observe is None:
raise ValueError("All observes in observe_embeddings are needed to initialize a new trace.")
return self._layer_observe_embedding_final(torch.cat([layer.forward(observe[name]).view(-1) for name, layer in self._layer_observe_embedding.items()]))
def infer_trace_init(self, observe=None):
self._infer_observe = observe
After Change
super().to(device=device, *args, *kwargs)
def _embed_observe(self, traces=None):
embedding = []
for name, layer in self._layer_observe_embedding.items():
values = torch.stack([trace.named_variables[name].value for trace in traces]).view(len(traces), -1)
embedding.append(layer(values))
embedding = torch.cat(embedding, dim=1)
embedding = self._layer_observe_embedding_final(embedding)
return embedding
def infer_trace_init(self, observe=None):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: pyprob/pyprob
Commit Name: a277fd89980f7a4647d0a17548aba7df37a5aefb
Time: 2018-09-19
Author: atilimgunes.baydin@gmail.com
File Name: pyprob/nn/inference_network_feedforward.py
Class Name: InferenceNetworkFeedForward
Method Name: _embed_observe
Project Name: rusty1s/pytorch_geometric
Commit Name: a5b315ac8ed989b7219cac0c0b335a6b429cfc14
Time: 2018-03-09
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/datasets/utils/planetoid.py
Class Name:
Method Name: read_planetoid
Project Name: pyprob/pyprob
Commit Name: c9628b38e1912774ef96437e14f93f959e3ceb6b
Time: 2018-04-19
Author: atilimgunes.baydin@gmail.com
File Name: pyprob/distributions.py
Class Name: Empirical
Method Name: combine