Custom-network-config must be absolute path?

I would like to kwown if custom-network-config must be with absolute path or can i give relative path?

Of course it can be a relative path, but you have to make sure the path is correct

1 Like

autodrive, I have tried but it doesnt work in my case. If my folder looks like:

– app/
---- main.py
---- config/
------ nvinfer_config.txt

Since the custom-network-config is inside “nvinfer_config.txt” file, the relative path must be with respect where is located or w.r.t main.py?

Yes, of cource.

follow your file path,in your main.py add

 cur_path = os.path.dirname(os.path.abspath(__file__))
 config_file_path = cur_path + os.path.sep + "config/nvinfer_config.txt"

It’s will be work fine.

thanks

your folde?
-----config/
---------nvinfer_config.txt
---------custom-network-config.txt
you need:
in main.py

./config/nvinfer_config.txt

in nvinfer_config.txt

./custom-network-config.txt

try it

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.