We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53fa6ed commit 597d7f6Copy full SHA for 597d7f6
onnx_diagnostic/helpers/torch_helper.py
@@ -1028,6 +1028,16 @@ def study_discrepancies(
1028
"""
1029
Computes different metrics for the discrepancies.
1030
Returns graphs.
1031
+
1032
+ .. plot::
1033
+ :include-source:
1034
1035
+ import torch
1036
+ from onnx_diagnostic.helpers.torch_helper import study_discrepancies
1037
1038
+ t1 = torch.randn((512, 1024)) * 10
1039
+ t2 = t1 + torch.randn((512, 1024))
1040
+ study_discrepancies(t1, t2, title="Random noise")
1041
1042
assert t1.dtype == t2.dtype, f"Type mismatch {t1.dtype} != {t2.dtype}"
1043
assert t1.shape == t2.shape, f"Shape mismatch {t1.shape} != {t2.shape}"
0 commit comments