Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: shape '[1, 1]' is invalid for input of size 25 #7

Open
idan0610 opened this issue Dec 23, 2024 · 0 comments
Open

RuntimeError: shape '[1, 1]' is invalid for input of size 25 #7

idan0610 opened this issue Dec 23, 2024 · 0 comments

Comments

@idan0610
Copy link

Running the NeuralSAT tool with the attached ONNX network and VNNLIB specification, I get the following error:

Restricted license - for non-production use only - expires 2025-11-24
/home/idan0610/miniconda3/envs/neuralsat/lib/python3.10/site-packages/torch/utils/cpp_extension.py:28: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  from pkg_resources import packaging  # type: ignore[attr-defined]
No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda'
Traceback (most recent call last):
  File "/home/idan0610/Marabou_dev/cdcl/neuralsat/neuralsat-pt201/util/network/read_onnx.py", line 95, in _parse_onnx
    output_onnx = torch.cat([torch.from_numpy(inference_onnx(path, dummy[i].view(orig_input_shape).float().numpy())[0]).view(batched_output_shape) for i in range(batch)])
  File "/home/idan0610/Marabou_dev/cdcl/neuralsat/neuralsat-pt201/util/network/read_onnx.py", line 95, in <listcomp>
    output_onnx = torch.cat([torch.from_numpy(inference_onnx(path, dummy[i].view(orig_input_shape).float().numpy())[0]).view(batched_output_shape) for i in range(batch)])
RuntimeError: shape '[1, 1]' is invalid for input of size 25

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/idan0610/Marabou_dev/cdcl/neuralsat/neuralsat-pt201/util/network/read_onnx.py", line 128, in parse_onnx
    return _parse_onnx(path)
  File "<@beartype(util.network.read_onnx._parse_onnx) at 0x7f5309052ef0>", line 30, in _parse_onnx
  File "/home/idan0610/Marabou_dev/cdcl/neuralsat/neuralsat-pt201/util/network/read_onnx.py", line 101, in _parse_onnx
    raise OnnxConversionError
util.misc.error.OnnxConversionError

To reproduce:

python3 main.py --net cls0_id45_cls1_id86.onnx --spec cls0_id45_cls1_id86.vnnlib

Thanks for your help on this issue!

cls0_id45_cls1_id86.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant