Skip to content

Conversation

@peterleif
Copy link

Problem

The current implementation of dnsmos_local.py assumes the script is called from the same directory as dnsmos_local.py. Therefore, you need to move to the "DNSMOS" directory when you execute the script.

My implementation

I added one line of code to get the absolute path of the "DNSMOS" directory where dnsmos_local.py resides. By specifying the onnx models relative to this path, the paths of the onnx models can be always resolved regardless of where dnsmos_local.py is called from. This makes using the script a lot more easier.

dnsmos_abs_path = os.path.dirname(os.path.abspath(__file__))

…dnsmos_local.py

By explicitly specifying paths, it is easier to run dnsmos_local.py from other directories.
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

Successfully merging this pull request may close these issues.

1 participant