Skip to content

Commit e2d19b7

Browse files
junjiang-labcopybara-github
authored andcommitted
Relax the check to enable Pad+Conv fusion with RELU6 to avoid numeric diffs in FP16.
PiperOrigin-RevId: 834438718
1 parent fcd9b5b commit e2d19b7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ai_edge_torch/_convert/test/test_convert.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,15 @@ def test_convert_resnet18(self):
100100
model_coverage.compare_tflite_torch(edge_model, torch_module, args)
101101
)
102102

103+
def test_convert_mobilenet_v2(self):
104+
args = (torch.randn(4, 3, 224, 224),)
105+
torch_module = torchvision.models.mobilenet_v2().eval()
106+
edge_model = ai_edge_torch.convert(torch_module, args)
107+
108+
self.assertTrue(
109+
model_coverage.compare_tflite_torch(edge_model, torch_module, args)
110+
)
111+
103112
def test_signature_args_ordering(self):
104113
"""Tests conversion of a model with more than 10 arguments."""
105114

0 commit comments

Comments
 (0)