Skip to content
Snippets Groups Projects
Commit 4ac7c420 authored by Cyril Moineau's avatar Cyril Moineau
Browse files

Update expected failures.

parent 557793f5
No related branches found
No related tags found
1 merge request!4Fix module
Pipeline #75195 failed
import torch
import aidge_interop_torch
import aidge_core
import aidge_onnx
import aidge_learning
import pytest
......@@ -67,6 +68,7 @@ test_cases = [
"input_size": (BATCH_SIZE, 1, 32, 32),
"output_size": (BATCH_SIZE, 10),
"test_backward": False,
"expected_failure": "No handling of MaxPool optional output"
},
{
"name": "LeNet_train",
......@@ -82,7 +84,7 @@ test_cases = [
"input_size": (BATCH_SIZE, 3, 96, 96),
"output_size": (BATCH_SIZE, 10),
"test_backward": False,
"expected_failure": "forward() not implemented yet for operator of type AveragePool"
"expected_failure": "Fail to load AveragePool from onnx (no native coverage)."
},
{
"name": "MobileNet_train",
......@@ -90,7 +92,7 @@ test_cases = [
"input_size": (BATCH_SIZE, 1, 96, 96),
"output_size": (BATCH_SIZE, 10),
"test_backward": True,
"expected_failure": "forward() not implemented yet for operator of type AveragePool"
"expected_failure": "Fail to load AveragePool from onnx (no native coverage)."
},
{
"name": "Perceptron_eval",
......@@ -112,7 +114,7 @@ test_cases = [
"input_size": (BATCH_SIZE, 3, 32, 32),
"output_size": (BATCH_SIZE, 10),
"test_backward": False,
"expected_failure": "forward() not implemented yet for operator of type AveragePool"
"expected_failure": "Fail to load AveragePool from onnx (no native coverage)."
},
{
"name": "ResNet_train",
......@@ -120,7 +122,7 @@ test_cases = [
"input_size": (BATCH_SIZE, 3, 32, 32),
"output_size": (BATCH_SIZE, 10),
"test_backward": True,
"expected_failure": "forward() not implemented yet for operator of type AveragePool"
"expected_failure": "Fail to load AveragePool from onnx (no native coverage)."
},
]
......@@ -141,7 +143,7 @@ def model_test_case(request):
# Wrap with Aidge
aidge_model = aidge_interop_torch.wrap(torch_model, input_size)
assert aidge_onnx.has_native_coverage(aidge_model._graph_view), f"Model has not a native coverage.\n{aidge_onnx.native_coverage_report(aidge_model._graph_view)}"
# Optional: Set optimizer for Aidge model
if cfg["test_backward"]:
opt = aidge_learning.SGD()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment