Commit 5cbf81c2 authored by Yuxin Wu's avatar Yuxin Wu

use HookedSession to do inference. fix #161

parent d3802e79
......@@ -91,8 +91,6 @@ class ScalarStats(Inferencer):
self.stats = []
def _datapoint(self, output):
for o in output:
assert isinstance(o, (float, np.float32)), type(o)
self.stats.append(output)
def _after_inference(self):
......
This diff is collapsed.
......@@ -194,6 +194,10 @@ class PredictorTowerBuilder(object):
@staticmethod
def get_tensors_maybe_in_tower(placeholder_names, names, k, prefix=''):
"""
Args:
placeholders (list): A list of __op__ name.
"""
def maybe_inside_tower(name):
name = get_op_tensor_name(name)[0]
if name in placeholder_names:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment