fix relative paths in validation scripts

This commit is contained in:
NiccoloN
2026-02-26 16:34:31 +01:00
parent a42ff74a3b
commit 0acd298e80
3 changed files with 15 additions and 18 deletions

View File

@@ -78,7 +78,11 @@ def validate_outputs(sim_arrays, runner_out_dir, outputs_descriptor, threshold=1
def validate_network(network_onnx_path, raptor_path, onnx_include_dir,
simulator_dir, crossbar_size=64, crossbar_count=8, threshold=1e-3):
network_onnx_path = Path(network_onnx_path).absolute()
network_onnx_path = Path(network_onnx_path).resolve()
raptor_path = Path(raptor_path).resolve()
onnx_include_dir = Path(onnx_include_dir).resolve()
simulator_dir = Path(simulator_dir).resolve()
workspace_dir = network_onnx_path.parent
raptor_dir = workspace_dir / "raptor"
runner_dir = workspace_dir / "runner"
@@ -95,7 +99,7 @@ def validate_network(network_onnx_path, raptor_path, onnx_include_dir,
print(Style.BRIGHT + "\nGenerating random inputs:" + Style.RESET_ALL)
inputs_descriptor, outputs_descriptor = onnx_io(network_onnx_path)
inputs_list, inputs_dict = gen_random_inputs(inputs_descriptor)
inputs_list, _inputs_dict = gen_random_inputs(inputs_descriptor)
flags, _files = save_inputs_to_files(network_onnx_path, inputs_list, out_dir=workspace_dir / "inputs")
print(Style.BRIGHT + "\nRunning inference with the runner:" + Style.RESET_ALL)