You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
self.assertTrue(cos_sim>COSINE_THRESHOLD, msg=f"standard_tensor_input_scripted TRT outputs don't match with the original model. Cosine sim score: {cos_sim} Threshold: {COSINE_THRESHOLD}")
self.assertTrue(cos_sim>COSINE_THRESHOLD, msg=f"tuple_input_scripted TRT outputs don't match with the original model. Cosine sim score: {cos_sim} Threshold: {COSINE_THRESHOLD}")
self.assertTrue(cos_sim>COSINE_THRESHOLD, msg=f"list_input_scripted TRT outputs don't match with the original model. Cosine sim score: {cos_sim} Threshold: {COSINE_THRESHOLD}")
msg=f"list_input_scripted TRT outputs don't match with the original model. Cosine sim score: {cos_sim} Threshold: {COSINE_THRESHOLD}",
106
+
)
92
107
93
108
94
109
classTestTupleInputOutput(unittest.TestCase):
@@ -115,7 +130,10 @@ def test_compile(self):
115
130
pyt_out=self.model((self.input, self.input))
116
131
for (t, p) inzip(trt_out, pyt_out):
117
132
cos_sim=cosine_similarity(t, p)
118
-
self.assertTrue(cos_sim>COSINE_THRESHOLD, msg=f"tuple_input_output_scripted TRT outputs don't match with the original model. Cosine sim score: {cos_sim} Threshold: {COSINE_THRESHOLD}")
133
+
self.assertTrue(
134
+
cos_sim>COSINE_THRESHOLD,
135
+
msg=f"tuple_input_output_scripted TRT outputs don't match with the original model. Cosine sim score: {cos_sim} Threshold: {COSINE_THRESHOLD}",
136
+
)
119
137
120
138
121
139
classTestListInputOutput(unittest.TestCase):
@@ -143,7 +161,10 @@ def test_compile(self):
143
161
144
162
for (t, p) inzip(trt_out, pyt_out):
145
163
cos_sim=cosine_similarity(t, p)
146
-
self.assertTrue(cos_sim>COSINE_THRESHOLD, msg=f"list_input_output_scripted TRT outputs don't match with the original model. Cosine sim score: {cos_sim} Threshold: {COSINE_THRESHOLD}")
164
+
self.assertTrue(
165
+
cos_sim>COSINE_THRESHOLD,
166
+
msg=f"list_input_output_scripted TRT outputs don't match with the original model. Cosine sim score: {cos_sim} Threshold: {COSINE_THRESHOLD}",
167
+
)
147
168
148
169
149
170
classTestListInputTupleOutput(unittest.TestCase):
@@ -170,7 +191,10 @@ def test_compile(self):
170
191
pyt_out=self.model((self.input, self.input))
171
192
for (t, p) inzip(trt_out, pyt_out):
172
193
cos_sim=cosine_similarity(t, p)
173
-
self.assertTrue(cos_sim>COSINE_THRESHOLD, msg=f"list_input_tuple_output_scripted TRT outputs don't match with the original model. Cosine sim score: {cos_sim} Threshold: {COSINE_THRESHOLD}")
194
+
self.assertTrue(
195
+
cos_sim>COSINE_THRESHOLD,
196
+
msg=f"list_input_tuple_output_scripted TRT outputs don't match with the original model. Cosine sim score: {cos_sim} Threshold: {COSINE_THRESHOLD}",
self.assertTrue(cos_sim>COSINE_THRESHOLD, msg=f"Resnet50 TRT outputs don't match with the original model. Cosine sim score: {cos_sim} Threshold: {COSINE_THRESHOLD}")
35
+
self.assertTrue(
36
+
cos_sim>COSINE_THRESHOLD,
37
+
msg=f"Resnet50 TRT outputs don't match with the original model. Cosine sim score: {cos_sim} Threshold: {COSINE_THRESHOLD}",
self.assertTrue(cos_sim>COSINE_THRESHOLD, msg=f"EfficientNet-B0 TRT outputs don't match with the original model. Cosine sim score: {cos_sim} Threshold: {COSINE_THRESHOLD}")
66
+
self.assertTrue(
67
+
cos_sim>COSINE_THRESHOLD,
68
+
msg=f"EfficientNet-B0 TRT outputs don't match with the original model. Cosine sim score: {cos_sim} Threshold: {COSINE_THRESHOLD}",
self.assertTrue(cos_sim>COSINE_THRESHOLD, msg=f"Resnet18 TRT outputs don't match with the original model. Cosine sim score: {cos_sim} Threshold: {COSINE_THRESHOLD}")
29
+
self.assertTrue(
30
+
cos_sim>COSINE_THRESHOLD,
31
+
msg=f"Resnet18 TRT outputs don't match with the original model. Cosine sim score: {cos_sim} Threshold: {COSINE_THRESHOLD}",
self.assertTrue(cos_sim>COSINE_THRESHOLD, msg=f"Mobilenet V2 TRT outputs don't match with the original model. Cosine sim score: {cos_sim} Threshold: {COSINE_THRESHOLD}")
55
+
self.assertTrue(
56
+
cos_sim>COSINE_THRESHOLD,
57
+
msg=f"Mobilenet V2 TRT outputs don't match with the original model. Cosine sim score: {cos_sim} Threshold: {COSINE_THRESHOLD}",
self.assertTrue(cos_sim>COSINE_THRESHOLD, msg=f"Resnet18 TRT outputs don't match with the original model. Cosine sim score: {cos_sim} Threshold: {COSINE_THRESHOLD}")
29
+
self.assertTrue(
30
+
cos_sim>COSINE_THRESHOLD,
31
+
msg=f"Resnet18 TRT outputs don't match with the original model. Cosine sim score: {cos_sim} Threshold: {COSINE_THRESHOLD}",
self.assertTrue(cos_sim>COSINE_THRESHOLD, msg=f"Mobilenet V2 TRT outputs don't match with the original model. Cosine sim score: {cos_sim} Threshold: {COSINE_THRESHOLD}")
52
+
self.assertTrue(
53
+
cos_sim>COSINE_THRESHOLD,
54
+
msg=f"Mobilenet V2 TRT outputs don't match with the original model. Cosine sim score: {cos_sim} Threshold: {COSINE_THRESHOLD}",
0 commit comments