if self.prior_tensor is None:
return Compiled.NOT_COMPILED
param_tensor = get_tensor_by_name(self.param_tensor.name, graph=graph)
prior_tensor = get_tensor_by_name(self.prior_tensor.name, graph=graph)
param_tensor_eq = self.param_tensor is not param_tensor
prior_tensor_eq = self.prior_tensor is not prior_tensor
if len(set([param_tensor_eq, prior_tensor_eq])) == 2:
raise GPflowError("Tensors with different graphs found.")
elif param_tensor_eq and prior_tensor_eq:
return Compiled.COMPILED
After Change
if self.param_tensor is None or (self.param_tensor.graph is not self.prior_tensor.graph):
raise GPflowTensorError("Tensor inconsistency found within parameter.")
if self.graph is graph:
return Compiled.COMPILED
return Compiled.NOT_COMPATIBLE_GRAPH
def compile(self, graph=None):