diff options
| author | ericmarin <maarin.eric@gmail.com> | 2026-03-17 18:59:35 +0100 |
|---|---|---|
| committer | ericmarin <maarin.eric@gmail.com> | 2026-03-18 13:18:40 +0100 |
| commit | 0fca69965786db7deee2e976551b5156531e8ed5 (patch) | |
| tree | 827ac0961e61076edf697f24374efc26867afb37 /xor | |
| parent | 5ff90e94c9bb411a0262a8130a6f0ce4125ca11b (diff) | |
| download | vein-0fca69965786db7deee2e976551b5156531e8ed5.tar.gz vein-0fca69965786db7deee2e976551b5156531e8ed5.zip | |
added proof for ONNX translation
Diffstat (limited to '')
| -rw-r--r-- | xor.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -4,7 +4,7 @@ import torch.onnx import nneq class xor_mlp(nn.Module): - def __init__(self, hidden_dim=8): + def __init__(self, hidden_dim): super().__init__() self.layers = nn.Sequential( nn.Linear(2, hidden_dim), @@ -37,8 +37,8 @@ if __name__ == "__main__": torch_net_a = train_model("Network A", 8).eval() torch_net_b = train_model("Network B", 16).eval() - onnx_net_a = torch.onnx.export(torch_net_a, (torch.randn(1, 2),), verbose=False, dynamo=True).model_proto # type: ignore - onnx_net_b = torch.onnx.export(torch_net_b, (torch.randn(1, 2),), verbose=False, dynamo=True).model_proto # type: ignore + onnx_net_a = torch.onnx.export(torch_net_a, (torch.randn(1, 2),), verbose=False).model_proto # type: ignore + onnx_net_b = torch.onnx.export(torch_net_b, (torch.randn(1, 2),), verbose=False).model_proto # type: ignore z3_net_a = nneq.net(onnx_net_a) z3_net_b = nneq.net(onnx_net_b) |
