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

Explicitly specify the paths for onnx models #177

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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