def _do_layer_inference(self, layer, data):
# If this is a collection of layers, return the mean of their inference
# results.
if isinstance(layer, collections.Iterable):
return math_ops.reduce_mean(
array_ops.pack([l.inference_graph(data) for l in layer]), 0)
# If this is a single layer, return its inference result.
else:
return layer.inference_graph(data)
评论列表
文章目录