Skip to content

Commit

Permalink
Improving diagnose RF NE with Cali (pytorch#9550)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch#9550

as titled

Differential Revision: D8899226

fbshipit-source-id: 3c7cf026e8cbc0e95770e5a35b213a97bebba385
  • Loading branch information
Xiaolong Wang authored and facebook-github-bot committed Jul 23, 2018
1 parent 88d6b6e commit 3e9e3ef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions caffe2/python/layer_model_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ def add_metric_field(self, name, value):
)

def add_ad_hoc_plot_blob(self, blob, dtype=None):
assert isinstance(
blob, (six.string_types, core.BlobReference)
), "expect type str or BlobReference, but got {}".format(type(blob))
dtype = dtype or (np.float, (1, ))
self.add_metric_field(str(blob), schema.Scalar(dtype, blob))
self.ad_hoc_plot_blobs.append(blob)
Expand Down

0 comments on commit 3e9e3ef

Please sign in to comment.