We want to perform the re-centering and re-scaling optimizations on the radon dataset using TensorFlow/PyMC4, similar to how we did in Theano/PyMC3 here.
import numpy as np
import pandas as pd
import tensorflow as tf
import pymc4 as pm
import arviz as az
data = pd.read_csv('https://github.com/pymc-devs/pymc3/raw/master/pymc3/examples/data/radon.csv')
county_names = data.county.unique()
county_idx = data['county_code'].values.astype(np.int32)
Listing pymc4-radon-model defines the standard hierarchical radon model in PyMC4.
@pm.model
def hierarchical_model(data, county_idx):
# Hyperpriors
mu_a = yield pm.Normal('mu_alpha', mu=0., sigma=1)
sigma_a = yield pm.HalfCauchy('sigma_alpha', beta=1)
mu_b = yield pm.Normal('mu_beta', mu=0., sigma=1)
sigma_b = yield pm.HalfCauchy('sigma_beta', beta=1)
# Intercept for each county, distributed around group mean mu_a
a = yield pm.Normal('alpha', mu=mu_a, sigma=sigma_a, plate=len(data.county.unique()))
# Intercept for each county, distributed around group mean mu_a
b = yield pm.Normal('beta', mu=mu_b, sigma=sigma_b, plate=len(data.county.unique()))
# Model error
eps = yield pm.HalfCauchy('eps', beta=1)
# Expected value
#radon_est = a[county_idx] + b[county_idx] * data.floor.values
radon_est = tf.gather(a, county_idx) + tf.gather(
b, county_idx) * data.floor.values
# Data likelihood
y_like = yield pm.Normal('y_like', mu=radon_est, sigma=eps, observed=data.log_radon)
init_num_chains = 50
model = hierarchical_model(data, county_idx)
Listing pymc4-radon-model-sample estimates the model in Listing pymc4-radon-model.
pm4_trace, sample_stat = pm.inference.sampling.sample(
model, num_chains=init_num_chains, num_samples=10, burn_in=10, step_size=1., xla=False)
In order to apply our optimization, we need to do some work to obtain a graph of the log-likelihood function generated by the model in Listing pymc4-radon-model. With the graph in-hand, we can perform the re-centering and re-scaling transform–in log-space this time–and obtain a new log-likelihood graph with which better samples can be generated.
This exercise introduces the TensorFlow function-graph elements that mirror Theano’s src_python[:eval never]{tt.function} and src_python[:eval never]{FunctionGraph}s: src_python[:eval never]{tensorflow.python.framework.func_graph.FuncGraph}. src_python[:eval never]{FuncGraph} is a subclass of the regular src_python[:eval never]{Graph} objects upon which implicitly src_python[:eval never]{symbolic_pymc} operates. Just as with Theano’s src_python[:eval never]{FunctionGraph}s, src_python[:eval never]{FuncGraph} simply specializes a graph by specifying inputs and outputs from elements (i.e. tensors) within a graph.
In Listing logp-func, we build the log-likelihood function for our model and a corresponding list of initial values for the parameters.
state = None
observed = None
logpfn, init = pm.inference.sampling.build_logp_function(model,
state=state,
observed=observed)
From here we need src_python[:eval never]{FuncGraph}s for each input to src_python[:eval never]{logpfn}. Since src_python[:eval never]{logpfn} is a src_python[:eval never]{tensorflow.python.eager.def_function.Function} instance, every time it’s called with a specific tensor it may create a new function-object with it’s own src_python[:eval never]{FuncGraph}. In other words, it dynamically generates function objects based on the inputs it’s given.
This specialization process can be performed manually using src_python[:eval never]{logpfn.get_concrete_function(*args)}, which necessarily produces a src_python[:eval never]{tensorflow.python.eager.function.ConcreteFunction} with the desired src_python[:eval never]{FuncGraph}. Listing fgraph-specializations creates and extracts these two objects.
logpfn_cf = logpfn.get_concrete_function(*init.values())
logpfn_fg = logpfn_cf.graph
The outputs are now available in graph form as src_python[:eval never]{logpfn_fg.outputs}. The inputs aren’t mapped in this particular function-graph output. I believe there’s a way to generate those as TF placeholders.
Listing print-output-graph prints the TF graph for the first output. (It’s actually pretty large, so let’s not.)
<<print-graph-dependencies>>
tf_dprint(logpfn_fg.outputs[0])
Tensor(Identity):0, shape=[] "Identity:0"
| Op(Identity) "Identity"
| | Tensor(AddV2):0, shape=[] "add_11:0"
| | | Op(AddV2) "add_11"
| | | | Tensor(AddV2):0, shape=[] "add_10:0"
| | | | | Op(AddV2) "add_10"
| | | | | | Tensor(AddV2):0, shape=[] "add_9:0"
| | | | | | | Op(AddV2) "add_9"
| | | | | | | | Tensor(AddV2):0, shape=[] "add_8:0"
| | | | | | | | | Op(AddV2) "add_8"
| | | | | | | | | | Tensor(AddV2):0, shape=[] "add_7:0"
| | | | | | | | | | | Op(AddV2) "add_7"
| | | | | | | | | | | | Tensor(AddV2):0, shape=[] "add_6:0"
| | | | | | | | | | | | | Op(AddV2) "add_6"
| | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "add_5:0"
| | | | | | | | | | | | | | | Op(AddV2) "add_5"
| | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "add_4:0"
| | | | | | | | | | | | | | | | | Op(AddV2) "add_4"
| | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "add_3:0"
| | | | | | | | | | | | | | | | | | | Op(AddV2) "add_3"
| | | | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "add_2:0"
| | | | | | | | | | | | | | | | | | | | | Op(AddV2) "add_2"
| | | | | | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "add_1:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(AddV2) "add_1"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "add_1/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Sum):0, shape=[] "Sum:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(Sum) "Sum"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "Normal_5/log_prob/sub:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "Normal_5/log_prob/sub"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[] "Normal_5/log_prob/mul:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Mul) "Normal_5/log_prob/mul"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_5/log_prob/mul/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(SquaredDifference):0, shape=[] "Normal_5/log_prob/SquaredDifference:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(SquaredDifference) "Normal_5/log_prob/SquaredDifference"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[] "Normal_5/log_prob/truediv:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "Normal_5/log_prob/truediv"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[] "values_4:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[] "Normal_5/log_prob/truediv_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "Normal_5/log_prob/truediv_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "Normal_5/log_prob/add:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(AddV2) "Normal_5/log_prob/add"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_5/log_prob/add/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Log):0, shape=[] "Normal_5/log_prob/Log:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Log) "Normal_5/log_prob/Log"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "Const:0"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Sum):0, shape=[] "Sum_1:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(Sum) "Sum_1"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(SelectV2):0, shape=[] "HalfCauchy_3/log_prob/SelectV2_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(SelectV2) "HalfCauchy_3/log_prob/SelectV2_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Less):0, shape=[] "HalfCauchy_3/log_prob/Less_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Less) "HalfCauchy_3/log_prob/Less_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Exp) "exp_1/forward/Exp"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[] "values_5:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_3/log_prob/SelectV2_1/t:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "HalfCauchy_3/log_prob/sub_2:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "HalfCauchy_3/log_prob/sub_2"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "HalfCauchy_3/log_prob/sub:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "HalfCauchy_3/log_prob/sub"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_3/log_prob/sub/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Log):0, shape=[] "HalfCauchy_3/log_prob/Log:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Log) "HalfCauchy_3/log_prob/Log"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Log1p):0, shape=[] "HalfCauchy_3/log_prob/Log1p:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Log1p) "HalfCauchy_3/log_prob/Log1p"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Pow):0, shape=[] "HalfCauchy_3/log_prob/pow:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Pow) "HalfCauchy_3/log_prob/pow"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[] "HalfCauchy_3/log_prob/truediv:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "HalfCauchy_3/log_prob/truediv"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "HalfCauchy_3/log_prob/sub_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "HalfCauchy_3/log_prob/sub_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(SelectV2):0, shape=[] "HalfCauchy_3/log_prob/SelectV2:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(SelectV2) "HalfCauchy_3/log_prob/SelectV2"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Less):0, shape=[] "HalfCauchy_3/log_prob/Less:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Less) "HalfCauchy_3/log_prob/Less"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "HalfCauchy_3/log_prob/add:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(AddV2) "HalfCauchy_3/log_prob/add"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[] "HalfCauchy_3/log_prob/mul:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Mul) "HalfCauchy_3/log_prob/mul"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_3/log_prob/mul/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_3/log_prob/pow/y:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "Const_1:0"
| | | | | | | | | | | | | | | | | | | | Tensor(Sum):0, shape=[] "Sum_2:0"
| | | | | | | | | | | | | | | | | | | | | Op(Sum) "Sum_2"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "Normal_1_1/log_prob/sub:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "Normal_1_1/log_prob/sub"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[] "Normal_1_1/log_prob/mul:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(Mul) "Normal_1_1/log_prob/mul"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_1_1/log_prob/mul/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(SquaredDifference):0, shape=[] "Normal_1_1/log_prob/SquaredDifference:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(SquaredDifference) "Normal_1_1/log_prob/SquaredDifference"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[] "Normal_1_1/log_prob/truediv:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "Normal_1_1/log_prob/truediv"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[] "values_2:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_1/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[] "Normal_1_1/log_prob/truediv_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "Normal_1_1/log_prob/truediv_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_1/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_1/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "Normal_1_1/log_prob/add:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(AddV2) "Normal_1_1/log_prob/add"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_1_1/log_prob/add/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Log):0, shape=[] "Normal_1_1/log_prob/Log:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Log) "Normal_1_1/log_prob/Log"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_1/scale:0"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "Const_2:0"
| | | | | | | | | | | | | | | | | | Tensor(Sum):0, shape=[] "Sum_3:0"
| | | | | | | | | | | | | | | | | | | Op(Sum) "Sum_3"
| | | | | | | | | | | | | | | | | | | | Tensor(SelectV2):0, shape=[] "HalfCauchy_1_1/log_prob/SelectV2_1:0"
| | | | | | | | | | | | | | | | | | | | | Op(SelectV2) "HalfCauchy_1_1/log_prob/SelectV2_1"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Less):0, shape=[] "HalfCauchy_1_1/log_prob/Less_1:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(Less) "HalfCauchy_1_1/log_prob/Less_1"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_2_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(Exp) "exp_2_1/forward/Exp"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[] "values_6:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1/loc:0"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1_1/log_prob/SelectV2_1/t:0"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "HalfCauchy_1_1/log_prob/sub_2:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "HalfCauchy_1_1/log_prob/sub_2"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "HalfCauchy_1_1/log_prob/sub:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "HalfCauchy_1_1/log_prob/sub"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1_1/log_prob/sub/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Log):0, shape=[] "HalfCauchy_1_1/log_prob/Log:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Log) "HalfCauchy_1_1/log_prob/Log"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Log1p):0, shape=[] "HalfCauchy_1_1/log_prob/Log1p:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(Log1p) "HalfCauchy_1_1/log_prob/Log1p"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Pow):0, shape=[] "HalfCauchy_1_1/log_prob/pow:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Pow) "HalfCauchy_1_1/log_prob/pow"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[] "HalfCauchy_1_1/log_prob/truediv:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "HalfCauchy_1_1/log_prob/truediv"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "HalfCauchy_1_1/log_prob/sub_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "HalfCauchy_1_1/log_prob/sub_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(SelectV2):0, shape=[] "HalfCauchy_1_1/log_prob/SelectV2:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(SelectV2) "HalfCauchy_1_1/log_prob/SelectV2"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Less):0, shape=[] "HalfCauchy_1_1/log_prob/Less:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Less) "HalfCauchy_1_1/log_prob/Less"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_2_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "HalfCauchy_1_1/log_prob/add:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(AddV2) "HalfCauchy_1_1/log_prob/add"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[] "HalfCauchy_1_1/log_prob/mul:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Mul) "HalfCauchy_1_1/log_prob/mul"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1_1/log_prob/mul/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_2_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1_1/log_prob/pow/y:0"
| | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "Const_3:0"
| | | | | | | | | | | | | | | | Tensor(Sum):0, shape=[] "Sum_4:0"
| | | | | | | | | | | | | | | | | Op(Sum) "Sum_4"
| | | | | | | | | | | | | | | | | | Tensor(Sum):0, shape=[] "SampleNormal_2_1/log_prob/Sum:0"
| | | | | | | | | | | | | | | | | | | Op(Sum) "SampleNormal_2_1/log_prob/Sum"
| | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[85] "SampleNormal_2_1/log_prob/Normal_2/log_prob/sub:0"
| | | | | | | | | | | | | | | | | | | | | Op(Sub) "SampleNormal_2_1/log_prob/Normal_2/log_prob/sub"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[85] "SampleNormal_2_1/log_prob/Normal_2/log_prob/mul:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(Mul) "SampleNormal_2_1/log_prob/Normal_2/log_prob/mul"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "SampleNormal_2_1/log_prob/Normal_2/log_prob/mul/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(SquaredDifference):0, shape=[85] "SampleNormal_2_1/log_prob/Normal_2/log_prob/SquaredDifference:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(SquaredDifference) "SampleNormal_2_1/log_prob/Normal_2/log_prob/SquaredDifference"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[85] "SampleNormal_2_1/log_prob/Normal_2/log_prob/truediv:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "SampleNormal_2_1/log_prob/Normal_2/log_prob/truediv"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Transpose):0, shape=[85] "SampleNormal_2_1/log_prob/transpose:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Transpose) "SampleNormal_2_1/log_prob/transpose"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Reshape):0, shape=[85] "SampleNormal_2_1/log_prob/Reshape:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Reshape) "SampleNormal_2_1/log_prob/Reshape"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[85] "values_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[1] "SampleNormal_2_1/log_prob/Reshape/shape:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[1] "SampleNormal_2_1/log_prob/transpose/perm:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[] "SampleNormal_2_1/log_prob/Normal_2/log_prob/truediv_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "SampleNormal_2_1/log_prob/Normal_2/log_prob/truediv_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[] "values_4:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "SampleNormal_2_1/log_prob/Normal_2/log_prob/add:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(AddV2) "SampleNormal_2_1/log_prob/Normal_2/log_prob/add"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "SampleNormal_2_1/log_prob/Normal_2/log_prob/add/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Log):0, shape=[] "SampleNormal_2_1/log_prob/Normal_2/log_prob/Log:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(Log) "SampleNormal_2_1/log_prob/Normal_2/log_prob/Log"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[1] "SampleNormal_2_1/log_prob/Sum/reduction_indices:0"
| | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "Const_4:0"
| | | | | | | | | | | | | | Tensor(Sum):0, shape=[] "Sum_5:0"
| | | | | | | | | | | | | | | Op(Sum) "Sum_5"
| | | | | | | | | | | | | | | | Tensor(Sum):0, shape=[] "SampleNormal_3_1/log_prob/Sum:0"
| | | | | | | | | | | | | | | | | Op(Sum) "SampleNormal_3_1/log_prob/Sum"
| | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[85] "SampleNormal_3_1/log_prob/Normal_3/log_prob/sub:0"
| | | | | | | | | | | | | | | | | | | Op(Sub) "SampleNormal_3_1/log_prob/Normal_3/log_prob/sub"
| | | | | | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[85] "SampleNormal_3_1/log_prob/Normal_3/log_prob/mul:0"
| | | | | | | | | | | | | | | | | | | | | Op(Mul) "SampleNormal_3_1/log_prob/Normal_3/log_prob/mul"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "SampleNormal_3_1/log_prob/Normal_3/log_prob/mul/x:0"
| | | | | | | | | | | | | | | | | | | | | | Tensor(SquaredDifference):0, shape=[85] "SampleNormal_3_1/log_prob/Normal_3/log_prob/SquaredDifference:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(SquaredDifference) "SampleNormal_3_1/log_prob/Normal_3/log_prob/SquaredDifference"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[85] "SampleNormal_3_1/log_prob/Normal_3/log_prob/truediv:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "SampleNormal_3_1/log_prob/Normal_3/log_prob/truediv"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Transpose):0, shape=[85] "SampleNormal_3_1/log_prob/transpose:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Transpose) "SampleNormal_3_1/log_prob/transpose"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Reshape):0, shape=[85] "SampleNormal_3_1/log_prob/Reshape:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Reshape) "SampleNormal_3_1/log_prob/Reshape"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[85] "values_3:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[1] "SampleNormal_3_1/log_prob/Reshape/shape:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[1] "SampleNormal_3_1/log_prob/transpose/perm:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_2_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[] "SampleNormal_3_1/log_prob/Normal_3/log_prob/truediv_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "SampleNormal_3_1/log_prob/Normal_3/log_prob/truediv_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[] "values_2:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_2_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "SampleNormal_3_1/log_prob/Normal_3/log_prob/add:0"
| | | | | | | | | | | | | | | | | | | | | Op(AddV2) "SampleNormal_3_1/log_prob/Normal_3/log_prob/add"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "SampleNormal_3_1/log_prob/Normal_3/log_prob/add/x:0"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Log):0, shape=[] "SampleNormal_3_1/log_prob/Normal_3/log_prob/Log:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(Log) "SampleNormal_3_1/log_prob/Normal_3/log_prob/Log"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_2_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[1] "SampleNormal_3_1/log_prob/Sum/reduction_indices:0"
| | | | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "Const_5:0"
| | | | | | | | | | | | Tensor(Sum):0, shape=[] "Sum_6:0"
| | | | | | | | | | | | | Op(Sum) "Sum_6"
| | | | | | | | | | | | | | Tensor(SelectV2):0, shape=[] "HalfCauchy_2_1/log_prob/SelectV2_1:0"
| | | | | | | | | | | | | | | Op(SelectV2) "HalfCauchy_2_1/log_prob/SelectV2_1"
| | | | | | | | | | | | | | | | Tensor(Less):0, shape=[] "HalfCauchy_2_1/log_prob/Less_1:0"
| | | | | | | | | | | | | | | | | Op(Less) "HalfCauchy_2_1/log_prob/Less_1"
| | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_3_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | Op(Exp) "exp_3_1/forward/Exp"
| | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[] "values_0:0"
| | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2/loc:0"
| | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2_1/log_prob/SelectV2_1/t:0"
| | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "HalfCauchy_2_1/log_prob/sub_2:0"
| | | | | | | | | | | | | | | | | Op(Sub) "HalfCauchy_2_1/log_prob/sub_2"
| | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "HalfCauchy_2_1/log_prob/sub:0"
| | | | | | | | | | | | | | | | | | | Op(Sub) "HalfCauchy_2_1/log_prob/sub"
| | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2_1/log_prob/sub/x:0"
| | | | | | | | | | | | | | | | | | | | Tensor(Log):0, shape=[] "HalfCauchy_2_1/log_prob/Log:0"
| | | | | | | | | | | | | | | | | | | | | Op(Log) "HalfCauchy_2_1/log_prob/Log"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2/scale:0"
| | | | | | | | | | | | | | | | | | Tensor(Log1p):0, shape=[] "HalfCauchy_2_1/log_prob/Log1p:0"
| | | | | | | | | | | | | | | | | | | Op(Log1p) "HalfCauchy_2_1/log_prob/Log1p"
| | | | | | | | | | | | | | | | | | | | Tensor(Pow):0, shape=[] "HalfCauchy_2_1/log_prob/pow:0"
| | | | | | | | | | | | | | | | | | | | | Op(Pow) "HalfCauchy_2_1/log_prob/pow"
| | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[] "HalfCauchy_2_1/log_prob/truediv:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "HalfCauchy_2_1/log_prob/truediv"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "HalfCauchy_2_1/log_prob/sub_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "HalfCauchy_2_1/log_prob/sub_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(SelectV2):0, shape=[] "HalfCauchy_2_1/log_prob/SelectV2:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(SelectV2) "HalfCauchy_2_1/log_prob/SelectV2"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Less):0, shape=[] "HalfCauchy_2_1/log_prob/Less:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Less) "HalfCauchy_2_1/log_prob/Less"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_3_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "HalfCauchy_2_1/log_prob/add:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(AddV2) "HalfCauchy_2_1/log_prob/add"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[] "HalfCauchy_2_1/log_prob/mul:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Mul) "HalfCauchy_2_1/log_prob/mul"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2_1/log_prob/mul/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_3_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2/scale:0"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2_1/log_prob/pow/y:0"
| | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "Const_6:0"
| | | | | | | | | | Tensor(Sum):0, shape=[] "Sum_7:0"
| | | | | | | | | | | Op(Sum) "Sum_7"
| | | | | | | | | | | | Tensor(Sub):0, shape=[919] "Normal_4_1/log_prob/sub:0"
| | | | | | | | | | | | | Op(Sub) "Normal_4_1/log_prob/sub"
| | | | | | | | | | | | | | Tensor(Mul):0, shape=[919] "Normal_4_1/log_prob/mul:0"
| | | | | | | | | | | | | | | Op(Mul) "Normal_4_1/log_prob/mul"
| | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_4_1/log_prob/mul/x:0"
| | | | | | | | | | | | | | | | Tensor(SquaredDifference):0, shape=[919] "Normal_4_1/log_prob/SquaredDifference:0"
| | | | | | | | | | | | | | | | | Op(SquaredDifference) "Normal_4_1/log_prob/SquaredDifference"
| | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[919] "Normal_4_1/log_prob/truediv:0"
| | | | | | | | | | | | | | | | | | | Op(RealDiv) "Normal_4_1/log_prob/truediv"
| | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[919] "Normal_4_1/log_prob/value:0"
| | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_3_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[919] "Normal_4_1/log_prob/truediv_1:0"
| | | | | | | | | | | | | | | | | | | Op(RealDiv) "Normal_4_1/log_prob/truediv_1"
| | | | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[919] "add:0"
| | | | | | | | | | | | | | | | | | | | | Op(AddV2) "add"
| | | | | | | | | | | | | | | | | | | | | | Tensor(GatherV2):0, shape=[919] "GatherV2:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(GatherV2) "GatherV2"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[85] "values_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[919] "GatherV2/indices:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "GatherV2/axis:0"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[919] "mul:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(Mul) "mul"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(GatherV2):0, shape=[919] "GatherV2_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(GatherV2) "GatherV2_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[85] "values_3:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[919] "GatherV2_1/indices:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "GatherV2_1/axis:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[919] "mul/y:0"
| | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_3_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "Normal_4_1/log_prob/add:0"
| | | | | | | | | | | | | | | Op(AddV2) "Normal_4_1/log_prob/add"
| | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_4_1/log_prob/add/x:0"
| | | | | | | | | | | | | | | | Tensor(Log):0, shape=[] "Normal_4_1/log_prob/Log:0"
| | | | | | | | | | | | | | | | | Op(Log) "Normal_4_1/log_prob/Log"
| | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_3_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | Tensor(Const):0, shape=[1] "Const_7:0"
| | | | | | | | Tensor(Sum):0, shape=[] "Sum_8:0"
| | | | | | | | | Op(Sum) "Sum_8"
| | | | | | | | | | Tensor(Mul):0, shape=[] "mul_1:0"
| | | | | | | | | | | Op(Mul) "mul_1"
| | | | | | | | | | | | Tensor(Sum):0, shape=[] "exp_4/inverse_log_det_jacobian/Sum:0"
| | | | | | | | | | | | | Op(Sum) "exp_4/inverse_log_det_jacobian/Sum"
| | | | | | | | | | | | | | Tensor(Mul):0, shape=[] "exp_4/inverse_log_det_jacobian/mul_1:0"
| | | | | | | | | | | | | | | Op(Mul) "exp_4/inverse_log_det_jacobian/mul_1"
| | | | | | | | | | | | | | | | Tensor(Fill):0, shape=[] "exp_4/inverse_log_det_jacobian/ones:0"
| | | | | | | | | | | | | | | | | Op(Fill) "exp_4/inverse_log_det_jacobian/ones"
| | | | | | | | | | | | | | | | | | Tensor(StridedSlice):0, shape=[0] "exp_4/inverse_log_det_jacobian/strided_slice:0"
| | | | | | | | | | | | | | | | | | | Op(StridedSlice) "exp_4/inverse_log_det_jacobian/strided_slice"
| | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "exp_4/inverse_log_det_jacobian/Shape:0"
| | | | | | | | | | | | | | | | | | | | Tensor(Pack):0, shape=[1] "exp_4/inverse_log_det_jacobian/strided_slice/stack:0"
| | | | | | | | | | | | | | | | | | | | | Op(Pack) "exp_4/inverse_log_det_jacobian/strided_slice/stack"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "exp_4/inverse_log_det_jacobian/sub:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "exp_4/inverse_log_det_jacobian/sub"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_4/inverse_log_det_jacobian/Size:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_4/inverse_log_det_jacobian/sub/y:0"
| | | | | | | | | | | | | | | | | | | | Tensor(Pack):0, shape=[1] "exp_4/inverse_log_det_jacobian/strided_slice/stack_1:0"
| | | | | | | | | | | | | | | | | | | | | Op(Pack) "exp_4/inverse_log_det_jacobian/strided_slice/stack_1"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "exp_4/inverse_log_det_jacobian/sub_1:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "exp_4/inverse_log_det_jacobian/sub_1"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_4/inverse_log_det_jacobian/Size:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_4/inverse_log_det_jacobian/sub_1/y:0"
| | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[1] "exp_4/inverse_log_det_jacobian/strided_slice/stack_2:0"
| | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_4/inverse_log_det_jacobian/ones/Const:0"
| | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[] "exp_4/inverse_log_det_jacobian/mul:0"
| | | | | | | | | | | | | | | | | Op(Mul) "exp_4/inverse_log_det_jacobian/mul"
| | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_4/inverse_log_det_jacobian/mul/x:0"
| | | | | | | | | | | | | | | | | | Tensor(Log):0, shape=[] "exp_4/inverse_log_det_jacobian/Log:0"
| | | | | | | | | | | | | | | | | | | Op(Log) "exp_4/inverse_log_det_jacobian/Log"
| | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "exp_4/inverse_log_det_jacobian/Sum/reduction_indices:0"
| | | | | | | | | | | | Tensor(Const):0, shape=[] "mul_1/y:0"
| | | | | | | | | | Tensor(Const):0, shape=[0] "Const_8:0"
| | | | | | Tensor(Sum):0, shape=[] "Sum_9:0"
| | | | | | | Op(Sum) "Sum_9"
| | | | | | | | Tensor(Mul):0, shape=[] "mul_2:0"
| | | | | | | | | Op(Mul) "mul_2"
| | | | | | | | | | Tensor(Sum):0, shape=[] "exp_2_2/inverse_log_det_jacobian/Sum:0"
| | | | | | | | | | | Op(Sum) "exp_2_2/inverse_log_det_jacobian/Sum"
| | | | | | | | | | | | Tensor(Mul):0, shape=[] "exp_2_2/inverse_log_det_jacobian/mul_1:0"
| | | | | | | | | | | | | Op(Mul) "exp_2_2/inverse_log_det_jacobian/mul_1"
| | | | | | | | | | | | | | Tensor(Fill):0, shape=[] "exp_2_2/inverse_log_det_jacobian/ones:0"
| | | | | | | | | | | | | | | Op(Fill) "exp_2_2/inverse_log_det_jacobian/ones"
| | | | | | | | | | | | | | | | Tensor(StridedSlice):0, shape=[0] "exp_2_2/inverse_log_det_jacobian/strided_slice:0"
| | | | | | | | | | | | | | | | | Op(StridedSlice) "exp_2_2/inverse_log_det_jacobian/strided_slice"
| | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "exp_2_2/inverse_log_det_jacobian/Shape:0"
| | | | | | | | | | | | | | | | | | Tensor(Pack):0, shape=[1] "exp_2_2/inverse_log_det_jacobian/strided_slice/stack:0"
| | | | | | | | | | | | | | | | | | | Op(Pack) "exp_2_2/inverse_log_det_jacobian/strided_slice/stack"
| | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "exp_2_2/inverse_log_det_jacobian/sub:0"
| | | | | | | | | | | | | | | | | | | | | Op(Sub) "exp_2_2/inverse_log_det_jacobian/sub"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_2_2/inverse_log_det_jacobian/Size:0"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_2_2/inverse_log_det_jacobian/sub/y:0"
| | | | | | | | | | | | | | | | | | Tensor(Pack):0, shape=[1] "exp_2_2/inverse_log_det_jacobian/strided_slice/stack_1:0"
| | | | | | | | | | | | | | | | | | | Op(Pack) "exp_2_2/inverse_log_det_jacobian/strided_slice/stack_1"
| | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "exp_2_2/inverse_log_det_jacobian/sub_1:0"
| | | | | | | | | | | | | | | | | | | | | Op(Sub) "exp_2_2/inverse_log_det_jacobian/sub_1"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_2_2/inverse_log_det_jacobian/Size:0"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_2_2/inverse_log_det_jacobian/sub_1/y:0"
| | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[1] "exp_2_2/inverse_log_det_jacobian/strided_slice/stack_2:0"
| | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_2_2/inverse_log_det_jacobian/ones/Const:0"
| | | | | | | | | | | | | | Tensor(Mul):0, shape=[] "exp_2_2/inverse_log_det_jacobian/mul:0"
| | | | | | | | | | | | | | | Op(Mul) "exp_2_2/inverse_log_det_jacobian/mul"
| | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_2_2/inverse_log_det_jacobian/mul/x:0"
| | | | | | | | | | | | | | | | Tensor(Log):0, shape=[] "exp_2_2/inverse_log_det_jacobian/Log:0"
| | | | | | | | | | | | | | | | | Op(Log) "exp_2_2/inverse_log_det_jacobian/Log"
| | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_2_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | Tensor(Const):0, shape=[0] "exp_2_2/inverse_log_det_jacobian/Sum/reduction_indices:0"
| | | | | | | | | | Tensor(Const):0, shape=[] "mul_2/y:0"
| | | | | | | | Tensor(Const):0, shape=[0] "Const_9:0"
| | | | Tensor(Sum):0, shape=[] "Sum_10:0"
| | | | | Op(Sum) "Sum_10"
| | | | | | Tensor(Mul):0, shape=[] "mul_3:0"
| | | | | | | Op(Mul) "mul_3"
| | | | | | | | Tensor(Sum):0, shape=[] "exp_3_2/inverse_log_det_jacobian/Sum:0"
| | | | | | | | | Op(Sum) "exp_3_2/inverse_log_det_jacobian/Sum"
| | | | | | | | | | Tensor(Mul):0, shape=[] "exp_3_2/inverse_log_det_jacobian/mul_1:0"
| | | | | | | | | | | Op(Mul) "exp_3_2/inverse_log_det_jacobian/mul_1"
| | | | | | | | | | | | Tensor(Fill):0, shape=[] "exp_3_2/inverse_log_det_jacobian/ones:0"
| | | | | | | | | | | | | Op(Fill) "exp_3_2/inverse_log_det_jacobian/ones"
| | | | | | | | | | | | | | Tensor(StridedSlice):0, shape=[0] "exp_3_2/inverse_log_det_jacobian/strided_slice:0"
| | | | | | | | | | | | | | | Op(StridedSlice) "exp_3_2/inverse_log_det_jacobian/strided_slice"
| | | | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "exp_3_2/inverse_log_det_jacobian/Shape:0"
| | | | | | | | | | | | | | | | Tensor(Pack):0, shape=[1] "exp_3_2/inverse_log_det_jacobian/strided_slice/stack:0"
| | | | | | | | | | | | | | | | | Op(Pack) "exp_3_2/inverse_log_det_jacobian/strided_slice/stack"
| | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "exp_3_2/inverse_log_det_jacobian/sub:0"
| | | | | | | | | | | | | | | | | | | Op(Sub) "exp_3_2/inverse_log_det_jacobian/sub"
| | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_3_2/inverse_log_det_jacobian/Size:0"
| | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_3_2/inverse_log_det_jacobian/sub/y:0"
| | | | | | | | | | | | | | | | Tensor(Pack):0, shape=[1] "exp_3_2/inverse_log_det_jacobian/strided_slice/stack_1:0"
| | | | | | | | | | | | | | | | | Op(Pack) "exp_3_2/inverse_log_det_jacobian/strided_slice/stack_1"
| | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "exp_3_2/inverse_log_det_jacobian/sub_1:0"
| | | | | | | | | | | | | | | | | | | Op(Sub) "exp_3_2/inverse_log_det_jacobian/sub_1"
| | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_3_2/inverse_log_det_jacobian/Size:0"
| | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_3_2/inverse_log_det_jacobian/sub_1/y:0"
| | | | | | | | | | | | | | | | Tensor(Const):0, shape=[1] "exp_3_2/inverse_log_det_jacobian/strided_slice/stack_2:0"
| | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_3_2/inverse_log_det_jacobian/ones/Const:0"
| | | | | | | | | | | | Tensor(Mul):0, shape=[] "exp_3_2/inverse_log_det_jacobian/mul:0"
| | | | | | | | | | | | | Op(Mul) "exp_3_2/inverse_log_det_jacobian/mul"
| | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_3_2/inverse_log_det_jacobian/mul/x:0"
| | | | | | | | | | | | | | Tensor(Log):0, shape=[] "exp_3_2/inverse_log_det_jacobian/Log:0"
| | | | | | | | | | | | | | | Op(Log) "exp_3_2/inverse_log_det_jacobian/Log"
| | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_3_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | ...
| | | | | | | | | | Tensor(Const):0, shape=[0] "exp_3_2/inverse_log_det_jacobian/Sum/reduction_indices:0"
| | | | | | | | Tensor(Const):0, shape=[] "mul_3/y:0"
| | | | | | Tensor(Const):0, shape=[0] "Const_10:0"
Consider the following two equivalent hierarchical models,
\begin{equation}
\begin{gathered}
Y = X + ε, \quad
ε ∼ \operatorname{N}\left(0, 1\right)
X ∼ \operatorname{N}\left(μ, σ^2\right)
\end{gathered}
\label{eq:model-1}
\end{equation}
\begin{equation}
\begin{gathered}
Y = μ + σ ⋅ ˜{X} + ε, \quad
ε ∼ \operatorname{N}\left(0, 1\right)
\
˜{X} ∼ \operatorname{N}\left(0, 1\right)
\;.
\end{gathered}
\label{eq:model-2}
\end{equation}
Models eq:model-1 and eq:model-2 are represented in (log) measure space,
respectively, as follows:
\begin{align}
log P(Y, X) &= log P(Y\mid X) + log P(X)
\nonumber
\
&= C - \frac{1}{2} \left(y - x\right)^2 - \frac{1}{2 σ^2} \left(x - μ\right)^2
\label{eq:log-model-1}
\
&= ˜{C} - \frac{1}{2} \left(y - μ - σ ⋅ ˜{x}\right)^2 - \frac{1}{2} ˜{x}^2
\label{eq:log-model-2}
\;.
\end{align}
Via term rewriting, Equation eq:log-model-2 is produced by first applying the replacement rule \(x → μ + σ ⋅ ˜{x}\) to Equation eq:log-model-1, which produces \begin{align*} C - \frac{1}{2} \left(y - (μ + σ ⋅ ˜{x})\right)^2 - \frac{1}{2 σ^2} \left((μ + σ ⋅ ˜{x}) - μ\right)^2 \;. \end{align*}
After a few applications of some simple algebraic properties–as further replacement rules–one obtains the exact form of Equation eq:log-model-2. Here, we’ll focus only on applying the initial replacement rule.
The log-density returned by TFP uses src_python[:eval never]{tf.math.squared_difference} to construct the “squared error” term in the exponential of a normal distribution (per the output of print-output-graph).
Listing squared-diff-demo shows what is produced by src_python[:eval never]{tf.math.squared_difference}.
from tensorflow.python.eager.context import graph_mode
<<print-graph-dependencies>>
# tf.compat.v1.reset_default_graph()
with graph_mode():
a_tf = tf.compat.v1.placeholder(tf.float32, name='A',
shape=tf.TensorShape([None]))
b_tf = tf.compat.v1.placeholder(tf.float32, name='B',
shape=tf.TensorShape([None]))
sqr_diff_tf = tf.math.squared_difference(a_tf, b_tf)
tf_dprint(sqr_diff_tf)
Tensor(SquaredDifference):0, shape=[None] "SquaredDifference:0"
| Op(SquaredDifference) "SquaredDifference"
| | Tensor(Placeholder):0, shape=[None] "A:0"
| | Tensor(Placeholder):0, shape=[None] "B:0"
The src_python[:eval never]{SquaredDifference} operators output by src_python[:eval never]{tf.math.squared_difference} contain the exact terms we will want to transform. More specifically, if we find a “chain” of such terms, i.e. src_python[:eval never]{SquaredDifference(y, x)} and src_python[:eval never]{SquaredDifference(x, mu)}, then we might be able to assume that the corresponding subgraph was formed from such a hierarchical normal model.
square_diff_outs = [o for o in logpfn_fg.get_operations()
if o.type == 'SquaredDifference']
for t in square_diff_outs:
tf_dprint(t)
Op(SquaredDifference) "Normal_5/log_prob/SquaredDifference"
| Tensor(RealDiv):0, shape=[] "Normal_5/log_prob/truediv:0"
| | Op(RealDiv) "Normal_5/log_prob/truediv"
| | | Tensor(Placeholder):0, shape=[] "values_4:0"
| | | Tensor(Const):0, shape=[] "Normal/scale:0"
| Tensor(RealDiv):0, shape=[] "Normal_5/log_prob/truediv_1:0"
| | Op(RealDiv) "Normal_5/log_prob/truediv_1"
| | | Tensor(Const):0, shape=[] "Normal/loc:0"
| | | Tensor(Const):0, shape=[] "Normal/scale:0"
Op(SquaredDifference) "Normal_1_1/log_prob/SquaredDifference"
| Tensor(RealDiv):0, shape=[] "Normal_1_1/log_prob/truediv:0"
| | Op(RealDiv) "Normal_1_1/log_prob/truediv"
| | | Tensor(Placeholder):0, shape=[] "values_2:0"
| | | Tensor(Const):0, shape=[] "Normal_1/scale:0"
| Tensor(RealDiv):0, shape=[] "Normal_1_1/log_prob/truediv_1:0"
| | Op(RealDiv) "Normal_1_1/log_prob/truediv_1"
| | | Tensor(Const):0, shape=[] "Normal_1/loc:0"
| | | Tensor(Const):0, shape=[] "Normal_1/scale:0"
Op(SquaredDifference) "SampleNormal_2_1/log_prob/Normal_2/log_prob/SquaredDifference"
| Tensor(RealDiv):0, shape=[85] "SampleNormal_2_1/log_prob/Normal_2/log_prob/truediv:0"
| | Op(RealDiv) "SampleNormal_2_1/log_prob/Normal_2/log_prob/truediv"
| | | Tensor(Transpose):0, shape=[85] "SampleNormal_2_1/log_prob/transpose:0"
| | | | Op(Transpose) "SampleNormal_2_1/log_prob/transpose"
| | | | | Tensor(Reshape):0, shape=[85] "SampleNormal_2_1/log_prob/Reshape:0"
| | | | | | Op(Reshape) "SampleNormal_2_1/log_prob/Reshape"
| | | | | | | Tensor(Placeholder):0, shape=[85] "values_1:0"
| | | | | | | Tensor(Const):0, shape=[1] "SampleNormal_2_1/log_prob/Reshape/shape:0"
| | | | | Tensor(Const):0, shape=[1] "SampleNormal_2_1/log_prob/transpose/perm:0"
| | | Tensor(Exp):0, shape=[] "exp_1/forward/Exp:0"
| | | | Op(Exp) "exp_1/forward/Exp"
| | | | | Tensor(Placeholder):0, shape=[] "values_5:0"
| Tensor(RealDiv):0, shape=[] "SampleNormal_2_1/log_prob/Normal_2/log_prob/truediv_1:0"
| | Op(RealDiv) "SampleNormal_2_1/log_prob/Normal_2/log_prob/truediv_1"
| | | Tensor(Placeholder):0, shape=[] "values_4:0"
| | | Tensor(Exp):0, shape=[] "exp_1/forward/Exp:0"
| | | | ...
Op(SquaredDifference) "SampleNormal_3_1/log_prob/Normal_3/log_prob/SquaredDifference"
| Tensor(RealDiv):0, shape=[85] "SampleNormal_3_1/log_prob/Normal_3/log_prob/truediv:0"
| | Op(RealDiv) "SampleNormal_3_1/log_prob/Normal_3/log_prob/truediv"
| | | Tensor(Transpose):0, shape=[85] "SampleNormal_3_1/log_prob/transpose:0"
| | | | Op(Transpose) "SampleNormal_3_1/log_prob/transpose"
| | | | | Tensor(Reshape):0, shape=[85] "SampleNormal_3_1/log_prob/Reshape:0"
| | | | | | Op(Reshape) "SampleNormal_3_1/log_prob/Reshape"
| | | | | | | Tensor(Placeholder):0, shape=[85] "values_3:0"
| | | | | | | Tensor(Const):0, shape=[1] "SampleNormal_3_1/log_prob/Reshape/shape:0"
| | | | | Tensor(Const):0, shape=[1] "SampleNormal_3_1/log_prob/transpose/perm:0"
| | | Tensor(Exp):0, shape=[] "exp_2_1/forward/Exp:0"
| | | | Op(Exp) "exp_2_1/forward/Exp"
| | | | | Tensor(Placeholder):0, shape=[] "values_6:0"
| Tensor(RealDiv):0, shape=[] "SampleNormal_3_1/log_prob/Normal_3/log_prob/truediv_1:0"
| | Op(RealDiv) "SampleNormal_3_1/log_prob/Normal_3/log_prob/truediv_1"
| | | Tensor(Placeholder):0, shape=[] "values_2:0"
| | | Tensor(Exp):0, shape=[] "exp_2_1/forward/Exp:0"
| | | | ...
Op(SquaredDifference) "Normal_4_1/log_prob/SquaredDifference"
| Tensor(RealDiv):0, shape=[919] "Normal_4_1/log_prob/truediv:0"
| | Op(RealDiv) "Normal_4_1/log_prob/truediv"
| | | Tensor(Const):0, shape=[919] "Normal_4_1/log_prob/value:0"
| | | Tensor(Exp):0, shape=[] "exp_3_1/forward/Exp:0"
| | | | Op(Exp) "exp_3_1/forward/Exp"
| | | | | Tensor(Placeholder):0, shape=[] "values_0:0"
| Tensor(RealDiv):0, shape=[919] "Normal_4_1/log_prob/truediv_1:0"
| | Op(RealDiv) "Normal_4_1/log_prob/truediv_1"
| | | Tensor(AddV2):0, shape=[919] "add:0"
| | | | Op(AddV2) "add"
| | | | | Tensor(GatherV2):0, shape=[919] "GatherV2:0"
| | | | | | Op(GatherV2) "GatherV2"
| | | | | | | Tensor(Placeholder):0, shape=[85] "values_1:0"
| | | | | | | Tensor(Const):0, shape=[919] "GatherV2/indices:0"
| | | | | | | Tensor(Const):0, shape=[] "GatherV2/axis:0"
| | | | | Tensor(Mul):0, shape=[919] "mul:0"
| | | | | | Op(Mul) "mul"
| | | | | | | Tensor(GatherV2):0, shape=[919] "GatherV2_1:0"
| | | | | | | | Op(GatherV2) "GatherV2_1"
| | | | | | | | | Tensor(Placeholder):0, shape=[85] "values_3:0"
| | | | | | | | | Tensor(Const):0, shape=[919] "GatherV2_1/indices:0"
| | | | | | | | | Tensor(Const):0, shape=[] "GatherV2_1/axis:0"
| | | | | | | Tensor(Const):0, shape=[919] "mul/y:0"
| | | Tensor(Exp):0, shape=[] "exp_3_1/forward/Exp:0"
| | | | ...
Listing show-squared-diff-terms shows the src_python[:eval never]{SquaredDifference} sub-graphs in the log-likelihood graph for our model and demonstrates at least one instance of the src_python[:eval never]{SquaredDifference} “chains” we need to identify (e.g. src_python[:eval never]{Placeholder}s with names like src_python[:eval never]{“values_0:0”} appearing in a first argument to a src_python[:eval never]{SquaredDifference} operator and–elsewhere–in a second argument to one.
More importantly, we can see that the actual src_python[:eval never]{SquaredDifference} “chains” do not use the relevant terms (i.e. those corresponding to values of a normal random variable like \(X\) or \(Y\)) as arguments directly; instead, these terms appear in the arguments. Since the arguments to src_python[:eval never]{SquaredDifference} in these cases are simply rescaled versions of \(X\) (and \(Y\)), we should be able to account for this in the unification pattern.
In Listing kanren-shift-squaredo-func, we create miniKanren functions that identify the aforementioned src_python[:eval never]{SquaredDifference} “chains” and perform the re-centered/scaled \(X\) substitution.
from functools import partial
from unification import var, reify
from kanren import run, eq, lall, conde
from kanren.goals import not_equalo, fail
from kanren.core import goaleval
from symbolic_pymc.tensorflow.meta import mt
from symbolic_pymc.relations.graph import graph_applyo, reduceo
from symbolic_pymc.etuple import ExpressionTuple, etuple
def track_terms(v, *args):
"""A hackish, non-relational way to keep track reified values."""
def g(s):
nonlocal args
args = reify(args, s)
sl = s.setdefault(v, [])
sl.append(args)
yield s
return g
def onceo(goal):
"""A non-relational operator that yields only the first result from a relation."""
def onceo_goal(s):
nonlocal goal
g = reify(goal, s)
g_stream = goaleval(g)(s)
s = next(g_stream)
yield s
return onceo_goal
def tf_graph_applyo(relation, a, b):
"""Construct a `graph_applyo` goal that evaluates a relation only at tensor nodes in a meta graph.
Parameters
----------
relation: function
A binary relation/goal constructor function
a: lvar, meta graph, or etuple
The left-hand side of the relation.
b: lvar, meta graph, or etuple
The right-hand side of the relation
"""
def _expand_some_nodes(node):
if isinstance(node, mt.Tensor) and node.op is not None:
return etuple(node.operator, *node.inputs, eval_obj=node)
return None
gapplyo = partial(graph_applyo, relation, preprocess_graph=_expand_some_nodes)
return gapplyo(a, b)
def shift_squared_terms(in_obj):
"""Transform latent SquaredDifference terms.
"""
def shift_squared_subso(in_graph, out_subs):
Y_lv, X_lv, mu_lv = var(), var(), var()
X_denom_lv = var()
X_form_mt = mt.Placeholder(dtype=var(), shape=var(), name=var())
sqr_diff_Y_mt = mt.SquaredDifference(Y_lv,
mt.realdiv(X_lv, var(), name=var()),
name=var())
def Y_sqrdiffo(in_g, out_g):
return lall(eq(in_g, sqr_diff_Y_mt),
# Just make sure we're only considering X's that are
# Placeholders.
eq(X_lv, X_form_mt))
sqr_diff_X_lv = mt.SquaredDifference(mt.realdiv(X_lv, X_denom_lv, name=var()),
mu_lv,
name=var())
def X_sqrdiffo(in_g, out_g):
return eq(in_g, sqr_diff_X_lv)
X_new_mt = mt.mul(X_denom_lv, mt.add(mu_lv, X_lv))
res = lall(tf_graph_applyo(Y_sqrdiffo, in_graph, in_graph),
tf_graph_applyo(X_sqrdiffo, in_graph, in_graph),
(not_equalo, [Y_lv, X_lv], True),
eq(out_subs, [X_lv, X_new_mt]))
return res
in_obj = mt(in_obj)
subs_lv = var()
subs_res = run(0, subs_lv, shift_squared_subso(in_obj, subs_lv))
def subs_replaceo(in_g, out_g):
def _subs_replaceo(in_g, out_g):
x_g = conde(*[[eq(in_g, x), eq(out_g, y)] for x, y in subs_res])
return x_g
g = onceo(tf_graph_applyo(_subs_replaceo, in_g, out_g))
return g
out_graph_lv = var()
res = run(1, out_graph_lv, reduceo(subs_replaceo, in_obj, out_graph_lv))
if res:
def reify_res(graph_res):
from_etuple = graph_res.eval_obj if isinstance(graph_res, ExpressionTuple) else graph_res
if hasattr(from_etuple, 'reify'):
return from_etuple.reify()
else:
return from_etuple
res = [reify_res(r) for r in res]
if len(res) == 1:
graph_res = res[0]
return graph_res, subs_res
Listing non-trivial-transform-test gives a non-trivial example of our new transformation.
with graph_mode():
a_tf = tf.compat.v1.placeholder(tf.float32, name='A',
shape=tf.TensorShape([None]))
b_tf = tf.compat.v1.placeholder(tf.float32, name='B',
shape=tf.TensorShape([None]))
c_tf = tf.compat.v1.placeholder(tf.float32, name='C',
shape=tf.TensorShape([None]))
test_input_tf = (
(c_tf * tf.math.squared_difference(b_tf,
a_tf / tf.math.squared_difference(a_tf, b_tf / 3.0))) +
# b_tf -> 5.0 * (c_tf + b_tf)
tf.math.log(tf.math.squared_difference(b_tf / 3.0, c_tf)) +
# a_tf -> 1.0 * (b_tf + a_tf)
tf.math.squared_difference(a_tf / 1.0, b_tf))
tf_dprint(test_input_tf)
Tensor(AddV2):0, shape=[None] "add_69:0"
| Op(AddV2) "add_69"
| | Tensor(AddV2):0, shape=[None] "add_68:0"
| | | Op(AddV2) "add_68"
| | | | Tensor(Mul):0, shape=[None] "mul_66:0"
| | | | | Op(Mul) "mul_66"
| | | | | | Tensor(Placeholder):0, shape=[None] "C_2:0"
| | | | | | Tensor(SquaredDifference):0, shape=[None] "SquaredDifference_10:0"
| | | | | | | Op(SquaredDifference) "SquaredDifference_10"
| | | | | | | | Tensor(Placeholder):0, shape=[None] "B_3:0"
| | | | | | | | Tensor(RealDiv):0, shape=[None] "truediv_10:0"
| | | | | | | | | Op(RealDiv) "truediv_10"
| | | | | | | | | | Tensor(Placeholder):0, shape=[None] "A_3:0"
| | | | | | | | | | Tensor(SquaredDifference):0, shape=[None] "SquaredDifference_9:0"
| | | | | | | | | | | Op(SquaredDifference) "SquaredDifference_9"
| | | | | | | | | | | | Tensor(Placeholder):0, shape=[None] "A_3:0"
| | | | | | | | | | | | Tensor(RealDiv):0, shape=[None] "truediv_9:0"
| | | | | | | | | | | | | Op(RealDiv) "truediv_9"
| | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[None] "B_3:0"
| | | | | | | | | | | | | | Tensor(Const):0, shape=[] "truediv_9/y:0"
| | | | Tensor(Log):0, shape=[None] "Log_3:0"
| | | | | Op(Log) "Log_3"
| | | | | | Tensor(SquaredDifference):0, shape=[None] "SquaredDifference_11:0"
| | | | | | | Op(SquaredDifference) "SquaredDifference_11"
| | | | | | | | Tensor(RealDiv):0, shape=[None] "truediv_11:0"
| | | | | | | | | Op(RealDiv) "truediv_11"
| | | | | | | | | | Tensor(Placeholder):0, shape=[None] "B_3:0"
| | | | | | | | | | Tensor(Const):0, shape=[] "truediv_11/y:0"
| | | | | | | | Tensor(Placeholder):0, shape=[None] "C_2:0"
| | Tensor(SquaredDifference):0, shape=[None] "SquaredDifference_12:0"
| | | Op(SquaredDifference) "SquaredDifference_12"
| | | | Tensor(RealDiv):0, shape=[None] "truediv_12:0"
| | | | | Op(RealDiv) "truediv_12"
| | | | | | Tensor(Placeholder):0, shape=[None] "A_3:0"
| | | | | | Tensor(Const):0, shape=[] "truediv_12/y:0"
| | | | Tensor(Placeholder):0, shape=[None] "B_3:0"
with graph_mode():
test_output_res, test_remaps = shift_squared_terms(test_input_tf)
tf_dprint(test_output_res)
Tensor(AddV2):0, shape=[None] "add_69_105:0"
| Op(AddV2) "add_69_105"
| | Tensor(AddV2):0, shape=[None] "add_68_97:0"
| | | Op(AddV2) "add_68_97"
| | | | Tensor(Mul):0, shape=[None] "mul_66_89:0"
| | | | | Op(Mul) "mul_66_89"
| | | | | | Tensor(Placeholder):0, shape=[None] "C_2:0"
| | | | | | Tensor(SquaredDifference):0, shape=[None] "SquaredDifference_10_89:0"
| | | | | | | Op(SquaredDifference) "SquaredDifference_10_89"
| | | | | | | | Tensor(Mul):0, shape=[None] "Mul_295:0"
| | | | | | | | | Op(Mul) "Mul_295"
| | | | | | | | | | Tensor(Const):0, shape=[] "truediv_11/y:0"
| | | | | | | | | | Tensor(Add):0, shape=[None] "Add_298:0"
| | | | | | | | | | | Op(Add) "Add_298"
| | | | | | | | | | | | Tensor(Placeholder):0, shape=[None] "C_2:0"
| | | | | | | | | | | | Tensor(Placeholder):0, shape=[None] "B_3:0"
| | | | | | | | Tensor(RealDiv):0, shape=[None] "truediv_10_73:0"
| | | | | | | | | Op(RealDiv) "truediv_10_73"
| | | | | | | | | | Tensor(Mul):0, shape=[None] "Mul_296:0"
| | | | | | | | | | | Op(Mul) "Mul_296"
| | | | | | | | | | | | Tensor(Const):0, shape=[] "truediv_12/y:0"
| | | | | | | | | | | | Tensor(Add):0, shape=[None] "Add_299:0"
| | | | | | | | | | | | | Op(Add) "Add_299"
| | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[None] "B_3:0"
| | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[None] "A_3:0"
| | | | | | | | | | Tensor(SquaredDifference):0, shape=[None] "SquaredDifference_9_65:0"
| | | | | | | | | | | Op(SquaredDifference) "SquaredDifference_9_65"
| | | | | | | | | | | | Tensor(Mul):0, shape=[None] "Mul_296:0"
| | | | | | | | | | | | | ...
| | | | | | | | | | | | Tensor(RealDiv):0, shape=[None] "truediv_9_39:0"
| | | | | | | | | | | | | Op(RealDiv) "truediv_9_39"
| | | | | | | | | | | | | | Tensor(Mul):0, shape=[None] "Mul_295:0"
| | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | Tensor(Const):0, shape=[] "truediv_9/y:0"
| | | | Tensor(Log):0, shape=[None] "Log_3_39:0"
| | | | | Op(Log) "Log_3_39"
| | | | | | Tensor(SquaredDifference):0, shape=[None] "SquaredDifference_11_39:0"
| | | | | | | Op(SquaredDifference) "SquaredDifference_11_39"
| | | | | | | | Tensor(RealDiv):0, shape=[None] "truediv_11_39:0"
| | | | | | | | | Op(RealDiv) "truediv_11_39"
| | | | | | | | | | Tensor(Mul):0, shape=[None] "Mul_295:0"
| | | | | | | | | | | ...
| | | | | | | | | | Tensor(Const):0, shape=[] "truediv_11/y:0"
| | | | | | | | Tensor(Placeholder):0, shape=[None] "C_2:0"
| | Tensor(SquaredDifference):0, shape=[None] "SquaredDifference_12_65:0"
| | | Op(SquaredDifference) "SquaredDifference_12_65"
| | | | Tensor(RealDiv):0, shape=[None] "truediv_12_28:0"
| | | | | Op(RealDiv) "truediv_12_28"
| | | | | | Tensor(Mul):0, shape=[None] "Mul_296:0"
| | | | | | | ...
| | | | | | Tensor(Const):0, shape=[] "truediv_12/y:0"
| | | | Tensor(Mul):0, shape=[None] "Mul_295:0"
| | | | | ...
from pprint import pprint
pprint(test_output_res)
<tf.Tensor 'add_69_105:0' shape=(None,) dtype=float32>
In Listing grappler-optimize we run src_python[:eval never]{grappler} on the test graph in Listing non-trivial-transform-test.
from tensorflow.python.framework import ops
from tensorflow.core.protobuf import config_pb2
from tensorflow.core.protobuf import meta_graph_pb2
from tensorflow.python.framework import meta_graph
from tensorflow.python.grappler import cluster
from tensorflow.python.grappler import tf_optimizer
from tensorflow.python.framework import importer
try:
gcluster = cluster.Cluster()
except tf.errors.UnavailableError:
pass
config = config_pb2.ConfigProto()
def preprocess_tf_graph(graph_output):
"""Use grappler to prune and minimally simplify a graph.
Arguments
=========
graph_output: Tensor
A tensor we want to consider as "output" of a FuncGraph.
Returns
=======
The simplified graph.
"""
train_op = graph_output.graph.get_collection_ref(ops.GraphKeys.TRAIN_OP)
train_op.clear()
train_op.extend([graph_output])
metagraph = meta_graph.create_meta_graph_def(graph=graph_output.graph)
optimized_graphdef = tf_optimizer.OptimizeGraph(
config, metagraph, verbose=True, cluster=gcluster)
optimized_graph = ops.Graph()
with optimized_graph.as_default():
importer.import_graph_def(optimized_graphdef, name="")
return optimized_graph
# optimized_metagraph = meta_graph_pb2.MetaGraphDef()
# optimized_metagraph.CopyFrom(metagraph)
# optimized_metagraph.graph_def.CopyFrom(optimized_graphdef)
optimized_graph = preprocess_tf_graph(test_output_tf)
NameError: name 'test_output_tf' is not defined
Listing opt-graph-check-sqrdiff confirms that all src_python[:eval never]{SquaredDifference} operations have been removed.
# This is no longer in the graph (and it shouldn't be)
try:
optimized_graph.get_operation_by_name('SquaredDifference')
except KeyError:
pass
else:
assert False
Listing opt-graph-nodes-diff shows the difference in node count between the original and optimized graphs.
print(max(test_output_tf.graph._nodes_by_id.keys()) - max(optimized_graph._nodes_by_id.keys()))
NameError: name 'test_output_tf' is not defined
Listing opt-graph-output-cmp compares the computed outputs for the original and optimized graphs–given identical inputs.
opt_test_output_tf = optimized_graph.get_tensor_by_name(test_output_tf.name)
res = test_output_tf.eval({'A:0': np.r_[3], 'B:0': np.r_[1], 'C:0': np.r_[1]},
session=tf.compat.v1.Session(graph=test_output_tf.graph))
res_opt = opt_test_output_tf.eval({'A:0': np.r_[3], 'B:0': np.r_[1], 'C:0': np.r_[1]},
session=tf.compat.v1.Session(graph=optimized_graph))
# They should be equal, naturally
assert np.array_equal(res, res_opt)
Per Listing opt-graph-print, we can see that the optimized graph is much smaller.
tf_dprint(opt_test_output_tf)
Now, we can do the same for the transformed log-likelihood graph.
optimized_graph = preprocess_tf_graph(logpfn_trans_tf)
opt_logpfn_trans_tf = optimized_graph.get_tensor_by_name(logpfn_trans_tf.name)
/tmp/user/1000/babel-9UDSHG/python-RG7tWP in <module>
----> 1 optimized_graph = preprocess_tf_graph(logpfn_trans_tf)
2 opt_logpfn_trans_tf = optimized_graph.get_tensor_by_name(logpfn_trans_tf.name)
NameError: name 'logpfn_trans_tf' is not defined
tf_dprint(opt_logpfn_trans_tf)
NameError: name 'opt_logpfn_trans_tf' is not defined
In debug-transform-single-node, we narrow in on a single node and apply the transform directly.
untransed_node_tf = logpfn_trans_tf.graph.get_tensor_by_name('Normal_5/log_prob/SquaredDifference:0')
with graph_mode(), logpfn_fg.as_default():
retry_trans_tf = shift_squared_terms(untransed_node_tf)
tf_dprint(retry_trans_tf)
with graph_mode(), logpfn_fg.as_default():
logpfn_trans_tf, logpfn_remaps = shift_squared_terms(logpfn_fg.outputs[0])
tf_dprint(logpfn_fg.outputs[0])
Tensor(Identity):0, shape=[] "Identity:0"
| Op(Identity) "Identity"
| | Tensor(AddV2):0, shape=[] "add_11:0"
| | | Op(AddV2) "add_11"
| | | | Tensor(AddV2):0, shape=[] "add_10:0"
| | | | | Op(AddV2) "add_10"
| | | | | | Tensor(AddV2):0, shape=[] "add_9:0"
| | | | | | | Op(AddV2) "add_9"
| | | | | | | | Tensor(AddV2):0, shape=[] "add_8:0"
| | | | | | | | | Op(AddV2) "add_8"
| | | | | | | | | | Tensor(AddV2):0, shape=[] "add_7:0"
| | | | | | | | | | | Op(AddV2) "add_7"
| | | | | | | | | | | | Tensor(AddV2):0, shape=[] "add_6:0"
| | | | | | | | | | | | | Op(AddV2) "add_6"
| | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "add_5:0"
| | | | | | | | | | | | | | | Op(AddV2) "add_5"
| | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "add_4:0"
| | | | | | | | | | | | | | | | | Op(AddV2) "add_4"
| | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "add_3:0"
| | | | | | | | | | | | | | | | | | | Op(AddV2) "add_3"
| | | | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "add_2:0"
| | | | | | | | | | | | | | | | | | | | | Op(AddV2) "add_2"
| | | | | | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "add_1:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(AddV2) "add_1"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "add_1/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Sum):0, shape=[] "Sum:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(Sum) "Sum"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "Normal_5/log_prob/sub:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "Normal_5/log_prob/sub"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[] "Normal_5/log_prob/mul:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Mul) "Normal_5/log_prob/mul"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_5/log_prob/mul/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(SquaredDifference):0, shape=[] "Normal_5/log_prob/SquaredDifference:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(SquaredDifference) "Normal_5/log_prob/SquaredDifference"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[] "Normal_5/log_prob/truediv:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "Normal_5/log_prob/truediv"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[] "values_4:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[] "Normal_5/log_prob/truediv_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "Normal_5/log_prob/truediv_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "Normal_5/log_prob/add:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(AddV2) "Normal_5/log_prob/add"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_5/log_prob/add/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Log):0, shape=[] "Normal_5/log_prob/Log:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Log) "Normal_5/log_prob/Log"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "Const:0"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Sum):0, shape=[] "Sum_1:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(Sum) "Sum_1"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(SelectV2):0, shape=[] "HalfCauchy_3/log_prob/SelectV2_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(SelectV2) "HalfCauchy_3/log_prob/SelectV2_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Less):0, shape=[] "HalfCauchy_3/log_prob/Less_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Less) "HalfCauchy_3/log_prob/Less_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Exp) "exp_1/forward/Exp"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[] "values_5:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_3/log_prob/SelectV2_1/t:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "HalfCauchy_3/log_prob/sub_2:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "HalfCauchy_3/log_prob/sub_2"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "HalfCauchy_3/log_prob/sub:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "HalfCauchy_3/log_prob/sub"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_3/log_prob/sub/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Log):0, shape=[] "HalfCauchy_3/log_prob/Log:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Log) "HalfCauchy_3/log_prob/Log"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Log1p):0, shape=[] "HalfCauchy_3/log_prob/Log1p:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Log1p) "HalfCauchy_3/log_prob/Log1p"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Pow):0, shape=[] "HalfCauchy_3/log_prob/pow:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Pow) "HalfCauchy_3/log_prob/pow"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[] "HalfCauchy_3/log_prob/truediv:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "HalfCauchy_3/log_prob/truediv"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "HalfCauchy_3/log_prob/sub_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "HalfCauchy_3/log_prob/sub_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(SelectV2):0, shape=[] "HalfCauchy_3/log_prob/SelectV2:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(SelectV2) "HalfCauchy_3/log_prob/SelectV2"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Less):0, shape=[] "HalfCauchy_3/log_prob/Less:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Less) "HalfCauchy_3/log_prob/Less"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "HalfCauchy_3/log_prob/add:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(AddV2) "HalfCauchy_3/log_prob/add"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[] "HalfCauchy_3/log_prob/mul:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Mul) "HalfCauchy_3/log_prob/mul"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_3/log_prob/mul/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_3/log_prob/pow/y:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "Const_1:0"
| | | | | | | | | | | | | | | | | | | | Tensor(Sum):0, shape=[] "Sum_2:0"
| | | | | | | | | | | | | | | | | | | | | Op(Sum) "Sum_2"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "Normal_1_1/log_prob/sub:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "Normal_1_1/log_prob/sub"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[] "Normal_1_1/log_prob/mul:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(Mul) "Normal_1_1/log_prob/mul"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_1_1/log_prob/mul/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(SquaredDifference):0, shape=[] "Normal_1_1/log_prob/SquaredDifference:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(SquaredDifference) "Normal_1_1/log_prob/SquaredDifference"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[] "Normal_1_1/log_prob/truediv:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "Normal_1_1/log_prob/truediv"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[] "values_2:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_1/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[] "Normal_1_1/log_prob/truediv_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "Normal_1_1/log_prob/truediv_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_1/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_1/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "Normal_1_1/log_prob/add:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(AddV2) "Normal_1_1/log_prob/add"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_1_1/log_prob/add/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Log):0, shape=[] "Normal_1_1/log_prob/Log:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Log) "Normal_1_1/log_prob/Log"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_1/scale:0"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "Const_2:0"
| | | | | | | | | | | | | | | | | | Tensor(Sum):0, shape=[] "Sum_3:0"
| | | | | | | | | | | | | | | | | | | Op(Sum) "Sum_3"
| | | | | | | | | | | | | | | | | | | | Tensor(SelectV2):0, shape=[] "HalfCauchy_1_1/log_prob/SelectV2_1:0"
| | | | | | | | | | | | | | | | | | | | | Op(SelectV2) "HalfCauchy_1_1/log_prob/SelectV2_1"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Less):0, shape=[] "HalfCauchy_1_1/log_prob/Less_1:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(Less) "HalfCauchy_1_1/log_prob/Less_1"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_2_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(Exp) "exp_2_1/forward/Exp"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[] "values_6:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1/loc:0"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1_1/log_prob/SelectV2_1/t:0"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "HalfCauchy_1_1/log_prob/sub_2:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "HalfCauchy_1_1/log_prob/sub_2"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "HalfCauchy_1_1/log_prob/sub:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "HalfCauchy_1_1/log_prob/sub"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1_1/log_prob/sub/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Log):0, shape=[] "HalfCauchy_1_1/log_prob/Log:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Log) "HalfCauchy_1_1/log_prob/Log"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Log1p):0, shape=[] "HalfCauchy_1_1/log_prob/Log1p:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(Log1p) "HalfCauchy_1_1/log_prob/Log1p"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Pow):0, shape=[] "HalfCauchy_1_1/log_prob/pow:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Pow) "HalfCauchy_1_1/log_prob/pow"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[] "HalfCauchy_1_1/log_prob/truediv:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "HalfCauchy_1_1/log_prob/truediv"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "HalfCauchy_1_1/log_prob/sub_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "HalfCauchy_1_1/log_prob/sub_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(SelectV2):0, shape=[] "HalfCauchy_1_1/log_prob/SelectV2:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(SelectV2) "HalfCauchy_1_1/log_prob/SelectV2"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Less):0, shape=[] "HalfCauchy_1_1/log_prob/Less:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Less) "HalfCauchy_1_1/log_prob/Less"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_2_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "HalfCauchy_1_1/log_prob/add:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(AddV2) "HalfCauchy_1_1/log_prob/add"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[] "HalfCauchy_1_1/log_prob/mul:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Mul) "HalfCauchy_1_1/log_prob/mul"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1_1/log_prob/mul/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_2_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1_1/log_prob/pow/y:0"
| | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "Const_3:0"
| | | | | | | | | | | | | | | | Tensor(Sum):0, shape=[] "Sum_4:0"
| | | | | | | | | | | | | | | | | Op(Sum) "Sum_4"
| | | | | | | | | | | | | | | | | | Tensor(Sum):0, shape=[] "SampleNormal_2_1/log_prob/Sum:0"
| | | | | | | | | | | | | | | | | | | Op(Sum) "SampleNormal_2_1/log_prob/Sum"
| | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[85] "SampleNormal_2_1/log_prob/Normal_2/log_prob/sub:0"
| | | | | | | | | | | | | | | | | | | | | Op(Sub) "SampleNormal_2_1/log_prob/Normal_2/log_prob/sub"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[85] "SampleNormal_2_1/log_prob/Normal_2/log_prob/mul:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(Mul) "SampleNormal_2_1/log_prob/Normal_2/log_prob/mul"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "SampleNormal_2_1/log_prob/Normal_2/log_prob/mul/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(SquaredDifference):0, shape=[85] "SampleNormal_2_1/log_prob/Normal_2/log_prob/SquaredDifference:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(SquaredDifference) "SampleNormal_2_1/log_prob/Normal_2/log_prob/SquaredDifference"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[85] "SampleNormal_2_1/log_prob/Normal_2/log_prob/truediv:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "SampleNormal_2_1/log_prob/Normal_2/log_prob/truediv"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Transpose):0, shape=[85] "SampleNormal_2_1/log_prob/transpose:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Transpose) "SampleNormal_2_1/log_prob/transpose"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Reshape):0, shape=[85] "SampleNormal_2_1/log_prob/Reshape:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Reshape) "SampleNormal_2_1/log_prob/Reshape"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[85] "values_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[1] "SampleNormal_2_1/log_prob/Reshape/shape:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[1] "SampleNormal_2_1/log_prob/transpose/perm:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[] "SampleNormal_2_1/log_prob/Normal_2/log_prob/truediv_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "SampleNormal_2_1/log_prob/Normal_2/log_prob/truediv_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[] "values_4:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "SampleNormal_2_1/log_prob/Normal_2/log_prob/add:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(AddV2) "SampleNormal_2_1/log_prob/Normal_2/log_prob/add"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "SampleNormal_2_1/log_prob/Normal_2/log_prob/add/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Log):0, shape=[] "SampleNormal_2_1/log_prob/Normal_2/log_prob/Log:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(Log) "SampleNormal_2_1/log_prob/Normal_2/log_prob/Log"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[1] "SampleNormal_2_1/log_prob/Sum/reduction_indices:0"
| | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "Const_4:0"
| | | | | | | | | | | | | | Tensor(Sum):0, shape=[] "Sum_5:0"
| | | | | | | | | | | | | | | Op(Sum) "Sum_5"
| | | | | | | | | | | | | | | | Tensor(Sum):0, shape=[] "SampleNormal_3_1/log_prob/Sum:0"
| | | | | | | | | | | | | | | | | Op(Sum) "SampleNormal_3_1/log_prob/Sum"
| | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[85] "SampleNormal_3_1/log_prob/Normal_3/log_prob/sub:0"
| | | | | | | | | | | | | | | | | | | Op(Sub) "SampleNormal_3_1/log_prob/Normal_3/log_prob/sub"
| | | | | | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[85] "SampleNormal_3_1/log_prob/Normal_3/log_prob/mul:0"
| | | | | | | | | | | | | | | | | | | | | Op(Mul) "SampleNormal_3_1/log_prob/Normal_3/log_prob/mul"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "SampleNormal_3_1/log_prob/Normal_3/log_prob/mul/x:0"
| | | | | | | | | | | | | | | | | | | | | | Tensor(SquaredDifference):0, shape=[85] "SampleNormal_3_1/log_prob/Normal_3/log_prob/SquaredDifference:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(SquaredDifference) "SampleNormal_3_1/log_prob/Normal_3/log_prob/SquaredDifference"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[85] "SampleNormal_3_1/log_prob/Normal_3/log_prob/truediv:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "SampleNormal_3_1/log_prob/Normal_3/log_prob/truediv"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Transpose):0, shape=[85] "SampleNormal_3_1/log_prob/transpose:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Transpose) "SampleNormal_3_1/log_prob/transpose"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Reshape):0, shape=[85] "SampleNormal_3_1/log_prob/Reshape:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Reshape) "SampleNormal_3_1/log_prob/Reshape"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[85] "values_3:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[1] "SampleNormal_3_1/log_prob/Reshape/shape:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[1] "SampleNormal_3_1/log_prob/transpose/perm:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_2_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[] "SampleNormal_3_1/log_prob/Normal_3/log_prob/truediv_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "SampleNormal_3_1/log_prob/Normal_3/log_prob/truediv_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[] "values_2:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_2_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "SampleNormal_3_1/log_prob/Normal_3/log_prob/add:0"
| | | | | | | | | | | | | | | | | | | | | Op(AddV2) "SampleNormal_3_1/log_prob/Normal_3/log_prob/add"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "SampleNormal_3_1/log_prob/Normal_3/log_prob/add/x:0"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Log):0, shape=[] "SampleNormal_3_1/log_prob/Normal_3/log_prob/Log:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(Log) "SampleNormal_3_1/log_prob/Normal_3/log_prob/Log"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_2_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[1] "SampleNormal_3_1/log_prob/Sum/reduction_indices:0"
| | | | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "Const_5:0"
| | | | | | | | | | | | Tensor(Sum):0, shape=[] "Sum_6:0"
| | | | | | | | | | | | | Op(Sum) "Sum_6"
| | | | | | | | | | | | | | Tensor(SelectV2):0, shape=[] "HalfCauchy_2_1/log_prob/SelectV2_1:0"
| | | | | | | | | | | | | | | Op(SelectV2) "HalfCauchy_2_1/log_prob/SelectV2_1"
| | | | | | | | | | | | | | | | Tensor(Less):0, shape=[] "HalfCauchy_2_1/log_prob/Less_1:0"
| | | | | | | | | | | | | | | | | Op(Less) "HalfCauchy_2_1/log_prob/Less_1"
| | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_3_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | Op(Exp) "exp_3_1/forward/Exp"
| | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[] "values_0:0"
| | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2/loc:0"
| | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2_1/log_prob/SelectV2_1/t:0"
| | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "HalfCauchy_2_1/log_prob/sub_2:0"
| | | | | | | | | | | | | | | | | Op(Sub) "HalfCauchy_2_1/log_prob/sub_2"
| | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "HalfCauchy_2_1/log_prob/sub:0"
| | | | | | | | | | | | | | | | | | | Op(Sub) "HalfCauchy_2_1/log_prob/sub"
| | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2_1/log_prob/sub/x:0"
| | | | | | | | | | | | | | | | | | | | Tensor(Log):0, shape=[] "HalfCauchy_2_1/log_prob/Log:0"
| | | | | | | | | | | | | | | | | | | | | Op(Log) "HalfCauchy_2_1/log_prob/Log"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2/scale:0"
| | | | | | | | | | | | | | | | | | Tensor(Log1p):0, shape=[] "HalfCauchy_2_1/log_prob/Log1p:0"
| | | | | | | | | | | | | | | | | | | Op(Log1p) "HalfCauchy_2_1/log_prob/Log1p"
| | | | | | | | | | | | | | | | | | | | Tensor(Pow):0, shape=[] "HalfCauchy_2_1/log_prob/pow:0"
| | | | | | | | | | | | | | | | | | | | | Op(Pow) "HalfCauchy_2_1/log_prob/pow"
| | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[] "HalfCauchy_2_1/log_prob/truediv:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "HalfCauchy_2_1/log_prob/truediv"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "HalfCauchy_2_1/log_prob/sub_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "HalfCauchy_2_1/log_prob/sub_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(SelectV2):0, shape=[] "HalfCauchy_2_1/log_prob/SelectV2:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(SelectV2) "HalfCauchy_2_1/log_prob/SelectV2"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Less):0, shape=[] "HalfCauchy_2_1/log_prob/Less:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Less) "HalfCauchy_2_1/log_prob/Less"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_3_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "HalfCauchy_2_1/log_prob/add:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(AddV2) "HalfCauchy_2_1/log_prob/add"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[] "HalfCauchy_2_1/log_prob/mul:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Mul) "HalfCauchy_2_1/log_prob/mul"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2_1/log_prob/mul/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_3_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2/scale:0"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2_1/log_prob/pow/y:0"
| | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "Const_6:0"
| | | | | | | | | | Tensor(Sum):0, shape=[] "Sum_7:0"
| | | | | | | | | | | Op(Sum) "Sum_7"
| | | | | | | | | | | | Tensor(Sub):0, shape=[919] "Normal_4_1/log_prob/sub:0"
| | | | | | | | | | | | | Op(Sub) "Normal_4_1/log_prob/sub"
| | | | | | | | | | | | | | Tensor(Mul):0, shape=[919] "Normal_4_1/log_prob/mul:0"
| | | | | | | | | | | | | | | Op(Mul) "Normal_4_1/log_prob/mul"
| | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_4_1/log_prob/mul/x:0"
| | | | | | | | | | | | | | | | Tensor(SquaredDifference):0, shape=[919] "Normal_4_1/log_prob/SquaredDifference:0"
| | | | | | | | | | | | | | | | | Op(SquaredDifference) "Normal_4_1/log_prob/SquaredDifference"
| | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[919] "Normal_4_1/log_prob/truediv:0"
| | | | | | | | | | | | | | | | | | | Op(RealDiv) "Normal_4_1/log_prob/truediv"
| | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[919] "Normal_4_1/log_prob/value:0"
| | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_3_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[919] "Normal_4_1/log_prob/truediv_1:0"
| | | | | | | | | | | | | | | | | | | Op(RealDiv) "Normal_4_1/log_prob/truediv_1"
| | | | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[919] "add:0"
| | | | | | | | | | | | | | | | | | | | | Op(AddV2) "add"
| | | | | | | | | | | | | | | | | | | | | | Tensor(GatherV2):0, shape=[919] "GatherV2:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(GatherV2) "GatherV2"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[85] "values_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[919] "GatherV2/indices:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "GatherV2/axis:0"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[919] "mul:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(Mul) "mul"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(GatherV2):0, shape=[919] "GatherV2_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(GatherV2) "GatherV2_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[85] "values_3:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[919] "GatherV2_1/indices:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "GatherV2_1/axis:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[919] "mul/y:0"
| | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_3_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "Normal_4_1/log_prob/add:0"
| | | | | | | | | | | | | | | Op(AddV2) "Normal_4_1/log_prob/add"
| | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_4_1/log_prob/add/x:0"
| | | | | | | | | | | | | | | | Tensor(Log):0, shape=[] "Normal_4_1/log_prob/Log:0"
| | | | | | | | | | | | | | | | | Op(Log) "Normal_4_1/log_prob/Log"
| | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_3_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | Tensor(Const):0, shape=[1] "Const_7:0"
| | | | | | | | Tensor(Sum):0, shape=[] "Sum_8:0"
| | | | | | | | | Op(Sum) "Sum_8"
| | | | | | | | | | Tensor(Mul):0, shape=[] "mul_1:0"
| | | | | | | | | | | Op(Mul) "mul_1"
| | | | | | | | | | | | Tensor(Sum):0, shape=[] "exp_4/inverse_log_det_jacobian/Sum:0"
| | | | | | | | | | | | | Op(Sum) "exp_4/inverse_log_det_jacobian/Sum"
| | | | | | | | | | | | | | Tensor(Mul):0, shape=[] "exp_4/inverse_log_det_jacobian/mul_1:0"
| | | | | | | | | | | | | | | Op(Mul) "exp_4/inverse_log_det_jacobian/mul_1"
| | | | | | | | | | | | | | | | Tensor(Fill):0, shape=[] "exp_4/inverse_log_det_jacobian/ones:0"
| | | | | | | | | | | | | | | | | Op(Fill) "exp_4/inverse_log_det_jacobian/ones"
| | | | | | | | | | | | | | | | | | Tensor(StridedSlice):0, shape=[0] "exp_4/inverse_log_det_jacobian/strided_slice:0"
| | | | | | | | | | | | | | | | | | | Op(StridedSlice) "exp_4/inverse_log_det_jacobian/strided_slice"
| | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "exp_4/inverse_log_det_jacobian/Shape:0"
| | | | | | | | | | | | | | | | | | | | Tensor(Pack):0, shape=[1] "exp_4/inverse_log_det_jacobian/strided_slice/stack:0"
| | | | | | | | | | | | | | | | | | | | | Op(Pack) "exp_4/inverse_log_det_jacobian/strided_slice/stack"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "exp_4/inverse_log_det_jacobian/sub:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "exp_4/inverse_log_det_jacobian/sub"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_4/inverse_log_det_jacobian/Size:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_4/inverse_log_det_jacobian/sub/y:0"
| | | | | | | | | | | | | | | | | | | | Tensor(Pack):0, shape=[1] "exp_4/inverse_log_det_jacobian/strided_slice/stack_1:0"
| | | | | | | | | | | | | | | | | | | | | Op(Pack) "exp_4/inverse_log_det_jacobian/strided_slice/stack_1"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "exp_4/inverse_log_det_jacobian/sub_1:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "exp_4/inverse_log_det_jacobian/sub_1"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_4/inverse_log_det_jacobian/Size:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_4/inverse_log_det_jacobian/sub_1/y:0"
| | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[1] "exp_4/inverse_log_det_jacobian/strided_slice/stack_2:0"
| | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_4/inverse_log_det_jacobian/ones/Const:0"
| | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[] "exp_4/inverse_log_det_jacobian/mul:0"
| | | | | | | | | | | | | | | | | Op(Mul) "exp_4/inverse_log_det_jacobian/mul"
| | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_4/inverse_log_det_jacobian/mul/x:0"
| | | | | | | | | | | | | | | | | | Tensor(Log):0, shape=[] "exp_4/inverse_log_det_jacobian/Log:0"
| | | | | | | | | | | | | | | | | | | Op(Log) "exp_4/inverse_log_det_jacobian/Log"
| | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "exp_4/inverse_log_det_jacobian/Sum/reduction_indices:0"
| | | | | | | | | | | | Tensor(Const):0, shape=[] "mul_1/y:0"
| | | | | | | | | | Tensor(Const):0, shape=[0] "Const_8:0"
| | | | | | Tensor(Sum):0, shape=[] "Sum_9:0"
| | | | | | | Op(Sum) "Sum_9"
| | | | | | | | Tensor(Mul):0, shape=[] "mul_2:0"
| | | | | | | | | Op(Mul) "mul_2"
| | | | | | | | | | Tensor(Sum):0, shape=[] "exp_2_2/inverse_log_det_jacobian/Sum:0"
| | | | | | | | | | | Op(Sum) "exp_2_2/inverse_log_det_jacobian/Sum"
| | | | | | | | | | | | Tensor(Mul):0, shape=[] "exp_2_2/inverse_log_det_jacobian/mul_1:0"
| | | | | | | | | | | | | Op(Mul) "exp_2_2/inverse_log_det_jacobian/mul_1"
| | | | | | | | | | | | | | Tensor(Fill):0, shape=[] "exp_2_2/inverse_log_det_jacobian/ones:0"
| | | | | | | | | | | | | | | Op(Fill) "exp_2_2/inverse_log_det_jacobian/ones"
| | | | | | | | | | | | | | | | Tensor(StridedSlice):0, shape=[0] "exp_2_2/inverse_log_det_jacobian/strided_slice:0"
| | | | | | | | | | | | | | | | | Op(StridedSlice) "exp_2_2/inverse_log_det_jacobian/strided_slice"
| | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "exp_2_2/inverse_log_det_jacobian/Shape:0"
| | | | | | | | | | | | | | | | | | Tensor(Pack):0, shape=[1] "exp_2_2/inverse_log_det_jacobian/strided_slice/stack:0"
| | | | | | | | | | | | | | | | | | | Op(Pack) "exp_2_2/inverse_log_det_jacobian/strided_slice/stack"
| | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "exp_2_2/inverse_log_det_jacobian/sub:0"
| | | | | | | | | | | | | | | | | | | | | Op(Sub) "exp_2_2/inverse_log_det_jacobian/sub"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_2_2/inverse_log_det_jacobian/Size:0"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_2_2/inverse_log_det_jacobian/sub/y:0"
| | | | | | | | | | | | | | | | | | Tensor(Pack):0, shape=[1] "exp_2_2/inverse_log_det_jacobian/strided_slice/stack_1:0"
| | | | | | | | | | | | | | | | | | | Op(Pack) "exp_2_2/inverse_log_det_jacobian/strided_slice/stack_1"
| | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "exp_2_2/inverse_log_det_jacobian/sub_1:0"
| | | | | | | | | | | | | | | | | | | | | Op(Sub) "exp_2_2/inverse_log_det_jacobian/sub_1"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_2_2/inverse_log_det_jacobian/Size:0"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_2_2/inverse_log_det_jacobian/sub_1/y:0"
| | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[1] "exp_2_2/inverse_log_det_jacobian/strided_slice/stack_2:0"
| | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_2_2/inverse_log_det_jacobian/ones/Const:0"
| | | | | | | | | | | | | | Tensor(Mul):0, shape=[] "exp_2_2/inverse_log_det_jacobian/mul:0"
| | | | | | | | | | | | | | | Op(Mul) "exp_2_2/inverse_log_det_jacobian/mul"
| | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_2_2/inverse_log_det_jacobian/mul/x:0"
| | | | | | | | | | | | | | | | Tensor(Log):0, shape=[] "exp_2_2/inverse_log_det_jacobian/Log:0"
| | | | | | | | | | | | | | | | | Op(Log) "exp_2_2/inverse_log_det_jacobian/Log"
| | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_2_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | Tensor(Const):0, shape=[0] "exp_2_2/inverse_log_det_jacobian/Sum/reduction_indices:0"
| | | | | | | | | | Tensor(Const):0, shape=[] "mul_2/y:0"
| | | | | | | | Tensor(Const):0, shape=[0] "Const_9:0"
| | | | Tensor(Sum):0, shape=[] "Sum_10:0"
| | | | | Op(Sum) "Sum_10"
| | | | | | Tensor(Mul):0, shape=[] "mul_3:0"
| | | | | | | Op(Mul) "mul_3"
| | | | | | | | Tensor(Sum):0, shape=[] "exp_3_2/inverse_log_det_jacobian/Sum:0"
| | | | | | | | | Op(Sum) "exp_3_2/inverse_log_det_jacobian/Sum"
| | | | | | | | | | Tensor(Mul):0, shape=[] "exp_3_2/inverse_log_det_jacobian/mul_1:0"
| | | | | | | | | | | Op(Mul) "exp_3_2/inverse_log_det_jacobian/mul_1"
| | | | | | | | | | | | Tensor(Fill):0, shape=[] "exp_3_2/inverse_log_det_jacobian/ones:0"
| | | | | | | | | | | | | Op(Fill) "exp_3_2/inverse_log_det_jacobian/ones"
| | | | | | | | | | | | | | Tensor(StridedSlice):0, shape=[0] "exp_3_2/inverse_log_det_jacobian/strided_slice:0"
| | | | | | | | | | | | | | | Op(StridedSlice) "exp_3_2/inverse_log_det_jacobian/strided_slice"
| | | | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "exp_3_2/inverse_log_det_jacobian/Shape:0"
| | | | | | | | | | | | | | | | Tensor(Pack):0, shape=[1] "exp_3_2/inverse_log_det_jacobian/strided_slice/stack:0"
| | | | | | | | | | | | | | | | | Op(Pack) "exp_3_2/inverse_log_det_jacobian/strided_slice/stack"
| | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "exp_3_2/inverse_log_det_jacobian/sub:0"
| | | | | | | | | | | | | | | | | | | Op(Sub) "exp_3_2/inverse_log_det_jacobian/sub"
| | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_3_2/inverse_log_det_jacobian/Size:0"
| | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_3_2/inverse_log_det_jacobian/sub/y:0"
| | | | | | | | | | | | | | | | Tensor(Pack):0, shape=[1] "exp_3_2/inverse_log_det_jacobian/strided_slice/stack_1:0"
| | | | | | | | | | | | | | | | | Op(Pack) "exp_3_2/inverse_log_det_jacobian/strided_slice/stack_1"
| | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "exp_3_2/inverse_log_det_jacobian/sub_1:0"
| | | | | | | | | | | | | | | | | | | Op(Sub) "exp_3_2/inverse_log_det_jacobian/sub_1"
| | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_3_2/inverse_log_det_jacobian/Size:0"
| | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_3_2/inverse_log_det_jacobian/sub_1/y:0"
| | | | | | | | | | | | | | | | Tensor(Const):0, shape=[1] "exp_3_2/inverse_log_det_jacobian/strided_slice/stack_2:0"
| | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_3_2/inverse_log_det_jacobian/ones/Const:0"
| | | | | | | | | | | | Tensor(Mul):0, shape=[] "exp_3_2/inverse_log_det_jacobian/mul:0"
| | | | | | | | | | | | | Op(Mul) "exp_3_2/inverse_log_det_jacobian/mul"
| | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_3_2/inverse_log_det_jacobian/mul/x:0"
| | | | | | | | | | | | | | Tensor(Log):0, shape=[] "exp_3_2/inverse_log_det_jacobian/Log:0"
| | | | | | | | | | | | | | | Op(Log) "exp_3_2/inverse_log_det_jacobian/Log"
| | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_3_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | ...
| | | | | | | | | | Tensor(Const):0, shape=[0] "exp_3_2/inverse_log_det_jacobian/Sum/reduction_indices:0"
| | | | | | | | Tensor(Const):0, shape=[] "mul_3/y:0"
| | | | | | Tensor(Const):0, shape=[0] "Const_10:0"
for r in logpfn_remaps:
[tf_dprint(i) for i in r]
print("------")
Tensor(Placeholder):0, shape=[] "values_4:0"
Tensor(Mul):0, shape=[] "Mul_8:0"
| Op(Mul) "Mul"
| | Tensor(Const):0, shape=[] "Normal/scale:0"
| | Tensor(Add):0, shape=[] "Add_16:0"
| | | Op(Add) "Add"
| | | | Tensor(RealDiv):0, shape=[] "Normal_5/log_prob/truediv_1:0"
| | | | | Op(RealDiv) "Normal_5/log_prob/truediv_1"
| | | | | | Tensor(Const):0, shape=[] "Normal/loc:0"
| | | | | | Tensor(Const):0, shape=[] "Normal/scale:0"
| | | | Tensor(Placeholder):0, shape=[] "values_4:0"
------
Tensor(Placeholder):0, shape=[] "values_2:0"
Tensor(Mul):0, shape=[] "Mul_9:0"
| Op(Mul) "Mul"
| | Tensor(Const):0, shape=[] "Normal_1/scale:0"
| | Tensor(Add):0, shape=[] "Add_17:0"
| | | Op(Add) "Add"
| | | | Tensor(RealDiv):0, shape=[] "Normal_1_1/log_prob/truediv_1:0"
| | | | | Op(RealDiv) "Normal_1_1/log_prob/truediv_1"
| | | | | | Tensor(Const):0, shape=[] "Normal_1/loc:0"
| | | | | | Tensor(Const):0, shape=[] "Normal_1/scale:0"
| | | | Tensor(Placeholder):0, shape=[] "values_2:0"
------
tf_dprint(logpfn_trans_tf)
Tensor(Identity):0, shape=[] "Identity_3:0"
| Op(Identity) "Identity_3"
| | Tensor(AddV2):0, shape=[] "add_11_3:0"
| | | Op(AddV2) "add_11_3"
| | | | Tensor(AddV2):0, shape=[] "add_10_3:0"
| | | | | Op(AddV2) "add_10_3"
| | | | | | Tensor(AddV2):0, shape=[] "add_9_3:0"
| | | | | | | Op(AddV2) "add_9_3"
| | | | | | | | Tensor(AddV2):0, shape=[] "add_8_3:0"
| | | | | | | | | Op(AddV2) "add_8_3"
| | | | | | | | | | Tensor(AddV2):0, shape=[] "add_7_3:0"
| | | | | | | | | | | Op(AddV2) "add_7_3"
| | | | | | | | | | | | Tensor(AddV2):0, shape=[] "add_6_3:0"
| | | | | | | | | | | | | Op(AddV2) "add_6_3"
| | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "add_5_3:0"
| | | | | | | | | | | | | | | Op(AddV2) "add_5_3"
| | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "add_4_3:0"
| | | | | | | | | | | | | | | | | Op(AddV2) "add_4_3"
| | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "add_3_3:0"
| | | | | | | | | | | | | | | | | | | Op(AddV2) "add_3_3"
| | | | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "add_2_3:0"
| | | | | | | | | | | | | | | | | | | | | Op(AddV2) "add_2_3"
| | | | | | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "add_1_3:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(AddV2) "add_1_3"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "add_1/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Sum):0, shape=[] "Sum_13:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(Sum) "Sum_13"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "Normal_5/log_prob/sub_3:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "Normal_5/log_prob/sub_3"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[] "Normal_5/log_prob/mul_3:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Mul) "Normal_5/log_prob/mul_3"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_5/log_prob/mul/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(SquaredDifference):0, shape=[] "Normal_5/log_prob/SquaredDifference_3:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(SquaredDifference) "Normal_5/log_prob/SquaredDifference_3"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[] "Normal_5/log_prob/truediv_4:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "Normal_5/log_prob/truediv_4"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[] "Mul_8:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Mul) "Mul_8"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Add):0, shape=[] "Add_16:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Add) "Add_16"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[] "Normal_5/log_prob/truediv_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "Normal_5/log_prob/truediv_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[] "values_4:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[] "Normal_5/log_prob/truediv_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "Normal_5/log_prob/add:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(AddV2) "Normal_5/log_prob/add"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_5/log_prob/add/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Log):0, shape=[] "Normal_5/log_prob/Log:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Log) "Normal_5/log_prob/Log"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "Const:0"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Sum):0, shape=[] "Sum_1:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(Sum) "Sum_1"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(SelectV2):0, shape=[] "HalfCauchy_3/log_prob/SelectV2_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(SelectV2) "HalfCauchy_3/log_prob/SelectV2_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Less):0, shape=[] "HalfCauchy_3/log_prob/Less_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Less) "HalfCauchy_3/log_prob/Less_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Exp) "exp_1/forward/Exp"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[] "values_5:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_3/log_prob/SelectV2_1/t:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "HalfCauchy_3/log_prob/sub_2:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "HalfCauchy_3/log_prob/sub_2"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "HalfCauchy_3/log_prob/sub:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "HalfCauchy_3/log_prob/sub"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_3/log_prob/sub/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Log):0, shape=[] "HalfCauchy_3/log_prob/Log:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Log) "HalfCauchy_3/log_prob/Log"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Log1p):0, shape=[] "HalfCauchy_3/log_prob/Log1p:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Log1p) "HalfCauchy_3/log_prob/Log1p"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Pow):0, shape=[] "HalfCauchy_3/log_prob/pow:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Pow) "HalfCauchy_3/log_prob/pow"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[] "HalfCauchy_3/log_prob/truediv:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "HalfCauchy_3/log_prob/truediv"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "HalfCauchy_3/log_prob/sub_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "HalfCauchy_3/log_prob/sub_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(SelectV2):0, shape=[] "HalfCauchy_3/log_prob/SelectV2:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(SelectV2) "HalfCauchy_3/log_prob/SelectV2"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Less):0, shape=[] "HalfCauchy_3/log_prob/Less:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Less) "HalfCauchy_3/log_prob/Less"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "HalfCauchy_3/log_prob/add:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(AddV2) "HalfCauchy_3/log_prob/add"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[] "HalfCauchy_3/log_prob/mul:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Mul) "HalfCauchy_3/log_prob/mul"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_3/log_prob/mul/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_3/log_prob/pow/y:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "Const_1:0"
| | | | | | | | | | | | | | | | | | | | Tensor(Sum):0, shape=[] "Sum_2_1:0"
| | | | | | | | | | | | | | | | | | | | | Op(Sum) "Sum_2_1"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "Normal_1_1/log_prob/sub_1:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "Normal_1_1/log_prob/sub_1"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[] "Normal_1_1/log_prob/mul_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(Mul) "Normal_1_1/log_prob/mul_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_1_1/log_prob/mul/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(SquaredDifference):0, shape=[] "Normal_1_1/log_prob/SquaredDifference_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(SquaredDifference) "Normal_1_1/log_prob/SquaredDifference_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[] "Normal_1_1/log_prob/truediv_2:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "Normal_1_1/log_prob/truediv_2"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[] "Mul_9:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Mul) "Mul_9"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_1/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Add):0, shape=[] "Add_17:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Add) "Add_17"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[] "Normal_1_1/log_prob/truediv_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "Normal_1_1/log_prob/truediv_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_1/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_1/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[] "values_2:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_1/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[] "Normal_1_1/log_prob/truediv_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "Normal_1_1/log_prob/add:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(AddV2) "Normal_1_1/log_prob/add"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_1_1/log_prob/add/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Log):0, shape=[] "Normal_1_1/log_prob/Log:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Log) "Normal_1_1/log_prob/Log"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_1/scale:0"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "Const_2:0"
| | | | | | | | | | | | | | | | | | Tensor(Sum):0, shape=[] "Sum_3:0"
| | | | | | | | | | | | | | | | | | | Op(Sum) "Sum_3"
| | | | | | | | | | | | | | | | | | | | Tensor(SelectV2):0, shape=[] "HalfCauchy_1_1/log_prob/SelectV2_1:0"
| | | | | | | | | | | | | | | | | | | | | Op(SelectV2) "HalfCauchy_1_1/log_prob/SelectV2_1"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Less):0, shape=[] "HalfCauchy_1_1/log_prob/Less_1:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(Less) "HalfCauchy_1_1/log_prob/Less_1"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_2_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(Exp) "exp_2_1/forward/Exp"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[] "values_6:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1/loc:0"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1_1/log_prob/SelectV2_1/t:0"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "HalfCauchy_1_1/log_prob/sub_2:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "HalfCauchy_1_1/log_prob/sub_2"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "HalfCauchy_1_1/log_prob/sub:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "HalfCauchy_1_1/log_prob/sub"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1_1/log_prob/sub/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Log):0, shape=[] "HalfCauchy_1_1/log_prob/Log:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Log) "HalfCauchy_1_1/log_prob/Log"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Log1p):0, shape=[] "HalfCauchy_1_1/log_prob/Log1p:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(Log1p) "HalfCauchy_1_1/log_prob/Log1p"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Pow):0, shape=[] "HalfCauchy_1_1/log_prob/pow:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Pow) "HalfCauchy_1_1/log_prob/pow"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[] "HalfCauchy_1_1/log_prob/truediv:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "HalfCauchy_1_1/log_prob/truediv"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "HalfCauchy_1_1/log_prob/sub_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "HalfCauchy_1_1/log_prob/sub_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(SelectV2):0, shape=[] "HalfCauchy_1_1/log_prob/SelectV2:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(SelectV2) "HalfCauchy_1_1/log_prob/SelectV2"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Less):0, shape=[] "HalfCauchy_1_1/log_prob/Less:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Less) "HalfCauchy_1_1/log_prob/Less"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_2_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "HalfCauchy_1_1/log_prob/add:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(AddV2) "HalfCauchy_1_1/log_prob/add"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[] "HalfCauchy_1_1/log_prob/mul:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Mul) "HalfCauchy_1_1/log_prob/mul"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1_1/log_prob/mul/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_2_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_1_1/log_prob/pow/y:0"
| | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "Const_3:0"
| | | | | | | | | | | | | | | | Tensor(Sum):0, shape=[] "Sum_4_3:0"
| | | | | | | | | | | | | | | | | Op(Sum) "Sum_4_3"
| | | | | | | | | | | | | | | | | | Tensor(Sum):0, shape=[] "SampleNormal_2_1/log_prob/Sum_3:0"
| | | | | | | | | | | | | | | | | | | Op(Sum) "SampleNormal_2_1/log_prob/Sum_3"
| | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[85] "SampleNormal_2_1/log_prob/Normal_2/log_prob/sub_3:0"
| | | | | | | | | | | | | | | | | | | | | Op(Sub) "SampleNormal_2_1/log_prob/Normal_2/log_prob/sub_3"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[85] "SampleNormal_2_1/log_prob/Normal_2/log_prob/mul_3:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(Mul) "SampleNormal_2_1/log_prob/Normal_2/log_prob/mul_3"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "SampleNormal_2_1/log_prob/Normal_2/log_prob/mul/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(SquaredDifference):0, shape=[85] "SampleNormal_2_1/log_prob/Normal_2/log_prob/SquaredDifference_3:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(SquaredDifference) "SampleNormal_2_1/log_prob/Normal_2/log_prob/SquaredDifference_3"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[85] "SampleNormal_2_1/log_prob/Normal_2/log_prob/truediv:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "SampleNormal_2_1/log_prob/Normal_2/log_prob/truediv"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Transpose):0, shape=[85] "SampleNormal_2_1/log_prob/transpose:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Transpose) "SampleNormal_2_1/log_prob/transpose"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Reshape):0, shape=[85] "SampleNormal_2_1/log_prob/Reshape:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Reshape) "SampleNormal_2_1/log_prob/Reshape"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[85] "values_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[1] "SampleNormal_2_1/log_prob/Reshape/shape:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[1] "SampleNormal_2_1/log_prob/transpose/perm:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[] "SampleNormal_2_1/log_prob/Normal_2/log_prob/truediv_1_3:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "SampleNormal_2_1/log_prob/Normal_2/log_prob/truediv_1_3"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[] "Mul_8:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "SampleNormal_2_1/log_prob/Normal_2/log_prob/add:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(AddV2) "SampleNormal_2_1/log_prob/Normal_2/log_prob/add"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "SampleNormal_2_1/log_prob/Normal_2/log_prob/add/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Log):0, shape=[] "SampleNormal_2_1/log_prob/Normal_2/log_prob/Log:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(Log) "SampleNormal_2_1/log_prob/Normal_2/log_prob/Log"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[1] "SampleNormal_2_1/log_prob/Sum/reduction_indices:0"
| | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "Const_4:0"
| | | | | | | | | | | | | | Tensor(Sum):0, shape=[] "Sum_5_1:0"
| | | | | | | | | | | | | | | Op(Sum) "Sum_5_1"
| | | | | | | | | | | | | | | | Tensor(Sum):0, shape=[] "SampleNormal_3_1/log_prob/Sum_1:0"
| | | | | | | | | | | | | | | | | Op(Sum) "SampleNormal_3_1/log_prob/Sum_1"
| | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[85] "SampleNormal_3_1/log_prob/Normal_3/log_prob/sub_1:0"
| | | | | | | | | | | | | | | | | | | Op(Sub) "SampleNormal_3_1/log_prob/Normal_3/log_prob/sub_1"
| | | | | | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[85] "SampleNormal_3_1/log_prob/Normal_3/log_prob/mul_1:0"
| | | | | | | | | | | | | | | | | | | | | Op(Mul) "SampleNormal_3_1/log_prob/Normal_3/log_prob/mul_1"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "SampleNormal_3_1/log_prob/Normal_3/log_prob/mul/x:0"
| | | | | | | | | | | | | | | | | | | | | | Tensor(SquaredDifference):0, shape=[85] "SampleNormal_3_1/log_prob/Normal_3/log_prob/SquaredDifference_1:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(SquaredDifference) "SampleNormal_3_1/log_prob/Normal_3/log_prob/SquaredDifference_1"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[85] "SampleNormal_3_1/log_prob/Normal_3/log_prob/truediv:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "SampleNormal_3_1/log_prob/Normal_3/log_prob/truediv"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Transpose):0, shape=[85] "SampleNormal_3_1/log_prob/transpose:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Transpose) "SampleNormal_3_1/log_prob/transpose"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Reshape):0, shape=[85] "SampleNormal_3_1/log_prob/Reshape:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Reshape) "SampleNormal_3_1/log_prob/Reshape"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[85] "values_3:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[1] "SampleNormal_3_1/log_prob/Reshape/shape:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[1] "SampleNormal_3_1/log_prob/transpose/perm:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_2_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[] "SampleNormal_3_1/log_prob/Normal_3/log_prob/truediv_1_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "SampleNormal_3_1/log_prob/Normal_3/log_prob/truediv_1_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[] "Mul_9:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_2_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "SampleNormal_3_1/log_prob/Normal_3/log_prob/add:0"
| | | | | | | | | | | | | | | | | | | | | Op(AddV2) "SampleNormal_3_1/log_prob/Normal_3/log_prob/add"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "SampleNormal_3_1/log_prob/Normal_3/log_prob/add/x:0"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Log):0, shape=[] "SampleNormal_3_1/log_prob/Normal_3/log_prob/Log:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(Log) "SampleNormal_3_1/log_prob/Normal_3/log_prob/Log"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_2_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[1] "SampleNormal_3_1/log_prob/Sum/reduction_indices:0"
| | | | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "Const_5:0"
| | | | | | | | | | | | Tensor(Sum):0, shape=[] "Sum_6:0"
| | | | | | | | | | | | | Op(Sum) "Sum_6"
| | | | | | | | | | | | | | Tensor(SelectV2):0, shape=[] "HalfCauchy_2_1/log_prob/SelectV2_1:0"
| | | | | | | | | | | | | | | Op(SelectV2) "HalfCauchy_2_1/log_prob/SelectV2_1"
| | | | | | | | | | | | | | | | Tensor(Less):0, shape=[] "HalfCauchy_2_1/log_prob/Less_1:0"
| | | | | | | | | | | | | | | | | Op(Less) "HalfCauchy_2_1/log_prob/Less_1"
| | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_3_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | Op(Exp) "exp_3_1/forward/Exp"
| | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[] "values_0:0"
| | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2/loc:0"
| | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2_1/log_prob/SelectV2_1/t:0"
| | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "HalfCauchy_2_1/log_prob/sub_2:0"
| | | | | | | | | | | | | | | | | Op(Sub) "HalfCauchy_2_1/log_prob/sub_2"
| | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "HalfCauchy_2_1/log_prob/sub:0"
| | | | | | | | | | | | | | | | | | | Op(Sub) "HalfCauchy_2_1/log_prob/sub"
| | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2_1/log_prob/sub/x:0"
| | | | | | | | | | | | | | | | | | | | Tensor(Log):0, shape=[] "HalfCauchy_2_1/log_prob/Log:0"
| | | | | | | | | | | | | | | | | | | | | Op(Log) "HalfCauchy_2_1/log_prob/Log"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2/scale:0"
| | | | | | | | | | | | | | | | | | Tensor(Log1p):0, shape=[] "HalfCauchy_2_1/log_prob/Log1p:0"
| | | | | | | | | | | | | | | | | | | Op(Log1p) "HalfCauchy_2_1/log_prob/Log1p"
| | | | | | | | | | | | | | | | | | | | Tensor(Pow):0, shape=[] "HalfCauchy_2_1/log_prob/pow:0"
| | | | | | | | | | | | | | | | | | | | | Op(Pow) "HalfCauchy_2_1/log_prob/pow"
| | | | | | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[] "HalfCauchy_2_1/log_prob/truediv:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(RealDiv) "HalfCauchy_2_1/log_prob/truediv"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "HalfCauchy_2_1/log_prob/sub_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "HalfCauchy_2_1/log_prob/sub_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(SelectV2):0, shape=[] "HalfCauchy_2_1/log_prob/SelectV2:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | Op(SelectV2) "HalfCauchy_2_1/log_prob/SelectV2"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Less):0, shape=[] "HalfCauchy_2_1/log_prob/Less:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Less) "HalfCauchy_2_1/log_prob/Less"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_3_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "HalfCauchy_2_1/log_prob/add:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(AddV2) "HalfCauchy_2_1/log_prob/add"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[] "HalfCauchy_2_1/log_prob/mul:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Op(Mul) "HalfCauchy_2_1/log_prob/mul"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2_1/log_prob/mul/x:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2/scale:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_3_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2/loc:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2/scale:0"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "HalfCauchy_2_1/log_prob/pow/y:0"
| | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "Const_6:0"
| | | | | | | | | | Tensor(Sum):0, shape=[] "Sum_7:0"
| | | | | | | | | | | Op(Sum) "Sum_7"
| | | | | | | | | | | | Tensor(Sub):0, shape=[919] "Normal_4_1/log_prob/sub:0"
| | | | | | | | | | | | | Op(Sub) "Normal_4_1/log_prob/sub"
| | | | | | | | | | | | | | Tensor(Mul):0, shape=[919] "Normal_4_1/log_prob/mul:0"
| | | | | | | | | | | | | | | Op(Mul) "Normal_4_1/log_prob/mul"
| | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_4_1/log_prob/mul/x:0"
| | | | | | | | | | | | | | | | Tensor(SquaredDifference):0, shape=[919] "Normal_4_1/log_prob/SquaredDifference:0"
| | | | | | | | | | | | | | | | | Op(SquaredDifference) "Normal_4_1/log_prob/SquaredDifference"
| | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[919] "Normal_4_1/log_prob/truediv:0"
| | | | | | | | | | | | | | | | | | | Op(RealDiv) "Normal_4_1/log_prob/truediv"
| | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[919] "Normal_4_1/log_prob/value:0"
| | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_3_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | | | | | Tensor(RealDiv):0, shape=[919] "Normal_4_1/log_prob/truediv_1:0"
| | | | | | | | | | | | | | | | | | | Op(RealDiv) "Normal_4_1/log_prob/truediv_1"
| | | | | | | | | | | | | | | | | | | | Tensor(AddV2):0, shape=[919] "add:0"
| | | | | | | | | | | | | | | | | | | | | Op(AddV2) "add"
| | | | | | | | | | | | | | | | | | | | | | Tensor(GatherV2):0, shape=[919] "GatherV2:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(GatherV2) "GatherV2"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[85] "values_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[919] "GatherV2/indices:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "GatherV2/axis:0"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[919] "mul:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(Mul) "mul"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(GatherV2):0, shape=[919] "GatherV2_1:0"
| | | | | | | | | | | | | | | | | | | | | | | | | Op(GatherV2) "GatherV2_1"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Placeholder):0, shape=[85] "values_3:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[919] "GatherV2_1/indices:0"
| | | | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "GatherV2_1/axis:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[919] "mul/y:0"
| | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_3_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | Tensor(AddV2):0, shape=[] "Normal_4_1/log_prob/add:0"
| | | | | | | | | | | | | | | Op(AddV2) "Normal_4_1/log_prob/add"
| | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "Normal_4_1/log_prob/add/x:0"
| | | | | | | | | | | | | | | | Tensor(Log):0, shape=[] "Normal_4_1/log_prob/Log:0"
| | | | | | | | | | | | | | | | | Op(Log) "Normal_4_1/log_prob/Log"
| | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_3_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | Tensor(Const):0, shape=[1] "Const_7:0"
| | | | | | | | Tensor(Sum):0, shape=[] "Sum_8:0"
| | | | | | | | | Op(Sum) "Sum_8"
| | | | | | | | | | Tensor(Mul):0, shape=[] "mul_1:0"
| | | | | | | | | | | Op(Mul) "mul_1"
| | | | | | | | | | | | Tensor(Sum):0, shape=[] "exp_4/inverse_log_det_jacobian/Sum:0"
| | | | | | | | | | | | | Op(Sum) "exp_4/inverse_log_det_jacobian/Sum"
| | | | | | | | | | | | | | Tensor(Mul):0, shape=[] "exp_4/inverse_log_det_jacobian/mul_1:0"
| | | | | | | | | | | | | | | Op(Mul) "exp_4/inverse_log_det_jacobian/mul_1"
| | | | | | | | | | | | | | | | Tensor(Fill):0, shape=[] "exp_4/inverse_log_det_jacobian/ones:0"
| | | | | | | | | | | | | | | | | Op(Fill) "exp_4/inverse_log_det_jacobian/ones"
| | | | | | | | | | | | | | | | | | Tensor(StridedSlice):0, shape=[0] "exp_4/inverse_log_det_jacobian/strided_slice:0"
| | | | | | | | | | | | | | | | | | | Op(StridedSlice) "exp_4/inverse_log_det_jacobian/strided_slice"
| | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "exp_4/inverse_log_det_jacobian/Shape:0"
| | | | | | | | | | | | | | | | | | | | Tensor(Pack):0, shape=[1] "exp_4/inverse_log_det_jacobian/strided_slice/stack:0"
| | | | | | | | | | | | | | | | | | | | | Op(Pack) "exp_4/inverse_log_det_jacobian/strided_slice/stack"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "exp_4/inverse_log_det_jacobian/sub:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "exp_4/inverse_log_det_jacobian/sub"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_4/inverse_log_det_jacobian/Size:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_4/inverse_log_det_jacobian/sub/y:0"
| | | | | | | | | | | | | | | | | | | | Tensor(Pack):0, shape=[1] "exp_4/inverse_log_det_jacobian/strided_slice/stack_1:0"
| | | | | | | | | | | | | | | | | | | | | Op(Pack) "exp_4/inverse_log_det_jacobian/strided_slice/stack_1"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "exp_4/inverse_log_det_jacobian/sub_1:0"
| | | | | | | | | | | | | | | | | | | | | | | Op(Sub) "exp_4/inverse_log_det_jacobian/sub_1"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_4/inverse_log_det_jacobian/Size:0"
| | | | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_4/inverse_log_det_jacobian/sub_1/y:0"
| | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[1] "exp_4/inverse_log_det_jacobian/strided_slice/stack_2:0"
| | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_4/inverse_log_det_jacobian/ones/Const:0"
| | | | | | | | | | | | | | | | Tensor(Mul):0, shape=[] "exp_4/inverse_log_det_jacobian/mul:0"
| | | | | | | | | | | | | | | | | Op(Mul) "exp_4/inverse_log_det_jacobian/mul"
| | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_4/inverse_log_det_jacobian/mul/x:0"
| | | | | | | | | | | | | | | | | | Tensor(Log):0, shape=[] "exp_4/inverse_log_det_jacobian/Log:0"
| | | | | | | | | | | | | | | | | | | Op(Log) "exp_4/inverse_log_det_jacobian/Log"
| | | | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "exp_4/inverse_log_det_jacobian/Sum/reduction_indices:0"
| | | | | | | | | | | | Tensor(Const):0, shape=[] "mul_1/y:0"
| | | | | | | | | | Tensor(Const):0, shape=[0] "Const_8:0"
| | | | | | Tensor(Sum):0, shape=[] "Sum_9:0"
| | | | | | | Op(Sum) "Sum_9"
| | | | | | | | Tensor(Mul):0, shape=[] "mul_2:0"
| | | | | | | | | Op(Mul) "mul_2"
| | | | | | | | | | Tensor(Sum):0, shape=[] "exp_2_2/inverse_log_det_jacobian/Sum:0"
| | | | | | | | | | | Op(Sum) "exp_2_2/inverse_log_det_jacobian/Sum"
| | | | | | | | | | | | Tensor(Mul):0, shape=[] "exp_2_2/inverse_log_det_jacobian/mul_1:0"
| | | | | | | | | | | | | Op(Mul) "exp_2_2/inverse_log_det_jacobian/mul_1"
| | | | | | | | | | | | | | Tensor(Fill):0, shape=[] "exp_2_2/inverse_log_det_jacobian/ones:0"
| | | | | | | | | | | | | | | Op(Fill) "exp_2_2/inverse_log_det_jacobian/ones"
| | | | | | | | | | | | | | | | Tensor(StridedSlice):0, shape=[0] "exp_2_2/inverse_log_det_jacobian/strided_slice:0"
| | | | | | | | | | | | | | | | | Op(StridedSlice) "exp_2_2/inverse_log_det_jacobian/strided_slice"
| | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "exp_2_2/inverse_log_det_jacobian/Shape:0"
| | | | | | | | | | | | | | | | | | Tensor(Pack):0, shape=[1] "exp_2_2/inverse_log_det_jacobian/strided_slice/stack:0"
| | | | | | | | | | | | | | | | | | | Op(Pack) "exp_2_2/inverse_log_det_jacobian/strided_slice/stack"
| | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "exp_2_2/inverse_log_det_jacobian/sub:0"
| | | | | | | | | | | | | | | | | | | | | Op(Sub) "exp_2_2/inverse_log_det_jacobian/sub"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_2_2/inverse_log_det_jacobian/Size:0"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_2_2/inverse_log_det_jacobian/sub/y:0"
| | | | | | | | | | | | | | | | | | Tensor(Pack):0, shape=[1] "exp_2_2/inverse_log_det_jacobian/strided_slice/stack_1:0"
| | | | | | | | | | | | | | | | | | | Op(Pack) "exp_2_2/inverse_log_det_jacobian/strided_slice/stack_1"
| | | | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "exp_2_2/inverse_log_det_jacobian/sub_1:0"
| | | | | | | | | | | | | | | | | | | | | Op(Sub) "exp_2_2/inverse_log_det_jacobian/sub_1"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_2_2/inverse_log_det_jacobian/Size:0"
| | | | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_2_2/inverse_log_det_jacobian/sub_1/y:0"
| | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[1] "exp_2_2/inverse_log_det_jacobian/strided_slice/stack_2:0"
| | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_2_2/inverse_log_det_jacobian/ones/Const:0"
| | | | | | | | | | | | | | Tensor(Mul):0, shape=[] "exp_2_2/inverse_log_det_jacobian/mul:0"
| | | | | | | | | | | | | | | Op(Mul) "exp_2_2/inverse_log_det_jacobian/mul"
| | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_2_2/inverse_log_det_jacobian/mul/x:0"
| | | | | | | | | | | | | | | | Tensor(Log):0, shape=[] "exp_2_2/inverse_log_det_jacobian/Log:0"
| | | | | | | | | | | | | | | | | Op(Log) "exp_2_2/inverse_log_det_jacobian/Log"
| | | | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_2_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | | | ...
| | | | | | | | | | | | Tensor(Const):0, shape=[0] "exp_2_2/inverse_log_det_jacobian/Sum/reduction_indices:0"
| | | | | | | | | | Tensor(Const):0, shape=[] "mul_2/y:0"
| | | | | | | | Tensor(Const):0, shape=[0] "Const_9:0"
| | | | Tensor(Sum):0, shape=[] "Sum_10:0"
| | | | | Op(Sum) "Sum_10"
| | | | | | Tensor(Mul):0, shape=[] "mul_3:0"
| | | | | | | Op(Mul) "mul_3"
| | | | | | | | Tensor(Sum):0, shape=[] "exp_3_2/inverse_log_det_jacobian/Sum:0"
| | | | | | | | | Op(Sum) "exp_3_2/inverse_log_det_jacobian/Sum"
| | | | | | | | | | Tensor(Mul):0, shape=[] "exp_3_2/inverse_log_det_jacobian/mul_1:0"
| | | | | | | | | | | Op(Mul) "exp_3_2/inverse_log_det_jacobian/mul_1"
| | | | | | | | | | | | Tensor(Fill):0, shape=[] "exp_3_2/inverse_log_det_jacobian/ones:0"
| | | | | | | | | | | | | Op(Fill) "exp_3_2/inverse_log_det_jacobian/ones"
| | | | | | | | | | | | | | Tensor(StridedSlice):0, shape=[0] "exp_3_2/inverse_log_det_jacobian/strided_slice:0"
| | | | | | | | | | | | | | | Op(StridedSlice) "exp_3_2/inverse_log_det_jacobian/strided_slice"
| | | | | | | | | | | | | | | | Tensor(Const):0, shape=[0] "exp_3_2/inverse_log_det_jacobian/Shape:0"
| | | | | | | | | | | | | | | | Tensor(Pack):0, shape=[1] "exp_3_2/inverse_log_det_jacobian/strided_slice/stack:0"
| | | | | | | | | | | | | | | | | Op(Pack) "exp_3_2/inverse_log_det_jacobian/strided_slice/stack"
| | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "exp_3_2/inverse_log_det_jacobian/sub:0"
| | | | | | | | | | | | | | | | | | | Op(Sub) "exp_3_2/inverse_log_det_jacobian/sub"
| | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_3_2/inverse_log_det_jacobian/Size:0"
| | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_3_2/inverse_log_det_jacobian/sub/y:0"
| | | | | | | | | | | | | | | | Tensor(Pack):0, shape=[1] "exp_3_2/inverse_log_det_jacobian/strided_slice/stack_1:0"
| | | | | | | | | | | | | | | | | Op(Pack) "exp_3_2/inverse_log_det_jacobian/strided_slice/stack_1"
| | | | | | | | | | | | | | | | | | Tensor(Sub):0, shape=[] "exp_3_2/inverse_log_det_jacobian/sub_1:0"
| | | | | | | | | | | | | | | | | | | Op(Sub) "exp_3_2/inverse_log_det_jacobian/sub_1"
| | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_3_2/inverse_log_det_jacobian/Size:0"
| | | | | | | | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_3_2/inverse_log_det_jacobian/sub_1/y:0"
| | | | | | | | | | | | | | | | Tensor(Const):0, shape=[1] "exp_3_2/inverse_log_det_jacobian/strided_slice/stack_2:0"
| | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_3_2/inverse_log_det_jacobian/ones/Const:0"
| | | | | | | | | | | | Tensor(Mul):0, shape=[] "exp_3_2/inverse_log_det_jacobian/mul:0"
| | | | | | | | | | | | | Op(Mul) "exp_3_2/inverse_log_det_jacobian/mul"
| | | | | | | | | | | | | | Tensor(Const):0, shape=[] "exp_3_2/inverse_log_det_jacobian/mul/x:0"
| | | | | | | | | | | | | | Tensor(Log):0, shape=[] "exp_3_2/inverse_log_det_jacobian/Log:0"
| | | | | | | | | | | | | | | Op(Log) "exp_3_2/inverse_log_det_jacobian/Log"
| | | | | | | | | | | | | | | | Tensor(Exp):0, shape=[] "exp_3_1/forward/Exp:0"
| | | | | | | | | | | | | | | | | ...
| | | | | | | | | | Tensor(Const):0, shape=[0] "exp_3_2/inverse_log_det_jacobian/Sum/reduction_indices:0"
| | | | | | | | Tensor(Const):0, shape=[] "mul_3/y:0"
| | | | | | Tensor(Const):0, shape=[0] "Const_10:0"
opt_logpfn_graph = preprocess_tf_graph(logpfn_fg.outputs[0])
opt_logpfn_output = opt_logpfn_graph.get_tensor_by_name(logpfn_fg.outputs[0].name)
square_diff_outs = [o for o in opt_logpfn_graph.get_operations()
if o.type == 'SquaredDifference']
for t in square_diff_outs:
tf_dprint(t)
Op(SquaredDifference) "Normal_1_1/log_prob/SquaredDifference"
| Tensor(Mul):0, shape=[] "Normal_1_1/log_prob/truediv:0"
| | Op(Mul) "Normal_1_1/log_prob/truediv"
| | | Tensor(Const):0, shape=[] "exp_3_2/inverse_log_det_jacobian/mul_1:0"
| | | Tensor(Placeholder):0, shape=[] "values_0:0"
| Tensor(Const):0, shape=[] "add_1/x:0"
Op(SquaredDifference) "Normal_5/log_prob/SquaredDifference"
| Tensor(Mul):0, shape=[] "Normal_5/log_prob/truediv:0"
| | Op(Mul) "Normal_5/log_prob/truediv"
| | | Tensor(Const):0, shape=[] "exp_3_2/inverse_log_det_jacobian/mul_1:0"
| | | Tensor(Placeholder):0, shape=[] "values_2:0"
| Tensor(Const):0, shape=[] "add_1/x:0"
Op(SquaredDifference) "SampleNormal_2_1/log_prob/Normal_2/log_prob/SquaredDifference"
| Tensor(RealDiv):0, shape=[85] "SampleNormal_2_1/log_prob/Normal_2/log_prob/truediv:0"
| | Op(RealDiv) "SampleNormal_2_1/log_prob/Normal_2/log_prob/truediv"
| | | Tensor(Reshape):0, shape=[85] "SampleNormal_2_1/log_prob/Reshape:0"
| | | | Op(Reshape) "SampleNormal_2_1/log_prob/Reshape"
| | | | | Tensor(Placeholder):0, shape=[85] "values_3:0"
| | | | | Tensor(Const):0, shape=[1] "SampleNormal_2_1/log_prob/Reshape/shape:0"
| | | Tensor(Exp):0, shape=[] "exp_1/forward/Exp:0"
| | | | Op(Exp) "exp_1/forward/Exp"
| | | | | Tensor(Placeholder):0, shape=[] "values_1:0"
| Tensor(RealDiv):0, shape=[] "SampleNormal_2_1/log_prob/Normal_2/log_prob/truediv_1:0"
| | Op(RealDiv) "SampleNormal_2_1/log_prob/Normal_2/log_prob/truediv_1"
| | | Tensor(Placeholder):0, shape=[] "values_2:0"
| | | Tensor(Exp):0, shape=[] "exp_1/forward/Exp:0"
| | | | ...
Op(SquaredDifference) "SampleNormal_3_1/log_prob/Normal_3/log_prob/SquaredDifference"
| Tensor(RealDiv):0, shape=[85] "SampleNormal_3_1/log_prob/Normal_3/log_prob/truediv:0"
| | Op(RealDiv) "SampleNormal_3_1/log_prob/Normal_3/log_prob/truediv"
| | | Tensor(Reshape):0, shape=[85] "SampleNormal_3_1/log_prob/Reshape:0"
| | | | Op(Reshape) "SampleNormal_3_1/log_prob/Reshape"
| | | | | Tensor(Placeholder):0, shape=[85] "values_5:0"
| | | | | Tensor(Const):0, shape=[1] "SampleNormal_2_1/log_prob/Reshape/shape:0"
| | | Tensor(Exp):0, shape=[] "exp_2_1/forward/Exp:0"
| | | | Op(Exp) "exp_2_1/forward/Exp"
| | | | | Tensor(Placeholder):0, shape=[] "values_4:0"
| Tensor(RealDiv):0, shape=[] "SampleNormal_3_1/log_prob/Normal_3/log_prob/truediv_1:0"
| | Op(RealDiv) "SampleNormal_3_1/log_prob/Normal_3/log_prob/truediv_1"
| | | Tensor(Placeholder):0, shape=[] "values_0:0"
| | | Tensor(Exp):0, shape=[] "exp_2_1/forward/Exp:0"
| | | | ...
Op(SquaredDifference) "Normal_4_1/log_prob/SquaredDifference"
| Tensor(RealDiv):0, shape=[919] "Normal_4_1/log_prob/truediv:0"
| | Op(RealDiv) "Normal_4_1/log_prob/truediv"
| | | Tensor(Const):0, shape=[919] "Normal_4_1/log_prob/value:0"
| | | Tensor(Exp):0, shape=[] "exp_3_1/forward/Exp:0"
| | | | Op(Exp) "exp_3_1/forward/Exp"
| | | | | Tensor(Placeholder):0, shape=[] "values_6:0"
| Tensor(RealDiv):0, shape=[919] "Normal_4_1/log_prob/truediv_1:0"
| | Op(RealDiv) "Normal_4_1/log_prob/truediv_1"
| | | Tensor(AddV2):0, shape=[919] "add:0"
| | | | Op(AddV2) "add"
| | | | | Tensor(GatherV2):0, shape=[919] "GatherV2:0"
| | | | | | Op(GatherV2) "GatherV2"
| | | | | | | Tensor(Placeholder):0, shape=[85] "values_3:0"
| | | | | | | Tensor(Const):0, shape=[919] "GatherV2/indices:0"
| | | | | | | Tensor(Const):0, shape=[] "GatherV2/axis:0"
| | | | | Tensor(Mul):0, shape=[919] "mul:0"
| | | | | | Op(Mul) "mul"
| | | | | | | Tensor(GatherV2):0, shape=[919] "GatherV2_1:0"
| | | | | | | | Op(GatherV2) "GatherV2_1"
| | | | | | | | | Tensor(Placeholder):0, shape=[85] "values_5:0"
| | | | | | | | | Tensor(Const):0, shape=[919] "GatherV2/indices:0"
| | | | | | | | | Tensor(Const):0, shape=[] "GatherV2/axis:0"
| | | | | | | Tensor(Const):0, shape=[919] "mul/y:0"
| | | Tensor(Exp):0, shape=[] "exp_3_1/forward/Exp:0"
| | | | ...
In Listing show-opt-squared-diff-terms we see that src_python[:eval never]{grappler} has made changes that break our transformation’s unification pattern (e.g. reordered arguments to src_python[:eval never]{SquaredDifference}).
with graph_mode(), opt_logpfn_graph.as_default():
logpfn_opt_trans_tf = shift_squared_graph(opt_logpfn_output)
tf_dprint(logpfn_opt_trans_tf)
None
This transform takes too long; we need to profile the results and try the goals in PR #59.
from cProfile import Profile
profiler = Profile()
with graph_mode(), logpfn_fg.as_default():
profiler.run('logpfn_trans_tf = shift_squared_graph(logpfn_fg.outputs[0])')
# 247435660 function calls (210349037 primitive calls) in 188.926 seconds
# 247229944 function calls (210173119 primitive calls) in 193.138 seconds
profiler.print_stats('time')
Now that we have a transformed version of the original log-likelihood graph (i.e. src_python[:eval never]{logpfn_trans_tf}), we need to create a new src_python[:eval never]{FuncGraph} from it.
from tensorflow.python.framework.func_graph import FuncGraph
from tensorflow.python.eager.function import ConcreteFunction
from tensorflow.python.eager.lift_to_graph import lift_to_graph
with logpfn_fg.as_default():
logpfn_fg_new = FuncGraph('logpfn_new', logpfn_fg.collections, logpfn_fg.capture_by_value)
old_to_new_ops = lift_to_graph([logpfn_trans_tf],
logpfn_fg_new,
add_sources=True,
handle_captures=True,
base_graph=logpfn_fg)
[i for i in logpfn_fg.inputs if i not in old_to_new_ops]
# len([i for i in logpfn_fg.inputs if i in old_to_new_ops])
logpfn_fg_new.inputs = [old_to_new_ops.get(i) for i in logpfn_fg.inputs
if i in old_to_new_ops]
assert len(logpfn_fg_new.inputs) == len(logpfn_fg.inputs)
logpfn_fg_new.outputs = [old_to_new_ops[logpfn_trans_tf]]
logpfn_fg_new.structured_outputs = logpfn_fg_new.outputs[0]
assert logpfn_fg_new.as_graph_element(logpfn_fg_new.outputs[0]) is not None
# signature = [tf.TensorSpec([None] + i.shape, i.dtype, i.name) for i in logpfn_fg_new.inputs]
logpfn_new_cf = ConcreteFunction(logpfn_fg_new)
logpfn_new_cf._arg_keywords = logpfn_cf._arg_keywords
logpfn_new_cf._num_positional_args = len(logpfn_fg_new.inputs)
The new TF function, src_python[:eval never]{logpfn_new_cf}, in Listing create-new-func-graph is the function we need for sampling.
Listing demo-old-fgraph-output shows how we could’ve created the analogous src_python[:eval never]{ConcreteFunction} object using the original, non-transformed graph and prints a value from its execution.
_ = logpfn_cf(*init.values())
Listing demo-new-fgraph-output prints a result from our new TF function using the new/transformed graph.
_ = logpfn_new_cf(*init.values())
In Listing sample-transformed-model, we reproduce the remaining steps of src_python[:eval never]{pm.inference.sampling.sample} that draw samples from our new transformed log-likelihood function.
from importlib import reload
# Let's make sure we save the original function
reload(pm.inference.sampling)
_build_logp_function = pm.inference.sampling.build_logp_function
def _new_build_logp_function(*args, **kwargs):
return logpfn_new_cf, init
pm.inference.sampling.build_logp_function = _new_build_logp_function
def sample(model, init_num_chains=50, num_samples=500, burn_in=500):
init_num_chains = 50
pm4_trace, _ = pm.inference.sampling.sample(
model, num_chains=init_num_chains, num_samples=10, burn_in=10, step_size=1., xla=True)
for i in range(3):
step_size_ = []
for _, x in pm4_trace.items():
std = tf.math.reduce_std(x, axis=[0, 1])
step_size_.append(
std[tf.newaxis, ...] * tf.ones([init_num_chains] + std.shape, dtype=std.dtype))
pm4_trace, _ = pm.inference.sampling.sample(
model, num_chains=init_num_chains, num_samples=10 + 10*i, burn_in=10 + 10*i,
step_size=step_size_, xla=True)
num_chains = 5
step_size_ = []
for _, x in pm4_trace.items():
std = tf.math.reduce_std(x, axis=[0, 1])
step_size_.append(
std[tf.newaxis, ...] * tf.ones([num_chains]+std.shape, dtype=std.dtype))
pm4_trace, sample_stat = pm.inference.sampling.sample(
model, num_chains=num_chains, num_samples=num_samples, burn_in=burn_in,
step_size=step_size_, xla=True)
az_trace = pm.inference.utils.trace_to_arviz(pm4_trace, sample_stat)
return az_trace
az_trace = sample(model)
import arviz as az
import matplotlib.pyplot as plt
az.plot_trace(az_trace,
var_names=[# 'hierarchical_model/sigma_beta',
'hierarchical_model/__log_sigma_beta'
])