8820d66965eeb2f5f7bfac58c0fcfc68e748d53a,pyprob/nn/inference_network.py,InferenceNetwork,_init_layers_observe_embedding,#InferenceNetwork#Any#Any#,64
Before Change
observe_embedding_total_dim = 0
for name, value in observe_embeddings.items():
distribution = example_trace.named_variables[name].distribution
if distribution is None:
raise ValueError("Observable {}: cannot use this observation as an input to the inference network, because there is no associated likelihood.".format(name))
else:
if "reshape" in value:
input_shape = torch.Size(value["reshape"])
else:
input_shape = distribution.sample().size()
if "dim" in value:
output_shape = torch.Size([value["dim"]])
else:
print("Observable {}: embedding dim not specified, using the default 256.".format(name))
After Change
input_shape = torch.Size(value["reshape"])
else:
input_shape = variable.value.size()
print("input_shape", input_shape)
if "dim" in value:
output_shape = torch.Size([value["dim"]])
else:
print("Observable {}: embedding dim not specified, using the default 256.".format(name))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: pyprob/pyprob
Commit Name: 8820d66965eeb2f5f7bfac58c0fcfc68e748d53a
Time: 2018-12-04
Author: atilimgunes.baydin@gmail.com
File Name: pyprob/nn/inference_network.py
Class Name: InferenceNetwork
Method Name: _init_layers_observe_embedding
Project Name: commonsense/conceptnet5
Commit Name: d3266d6e0ff7d771bd408631f7849e2e4500bebd
Time: 2017-06-16
Author: joanna.teresa.duda@gmail.com
File Name: conceptnet5/vectors/transforms.py
Class Name:
Method Name: make_replacements_faster
Project Name: SPFlow/SPFlow
Commit Name: 46c988491513e69dd6cfb595e575b6690fb8fef9
Time: 2018-09-13
Author: claas@voelcker.net
File Name: src/Documentation/basics.py
Class Name:
Method Name: